zstd-ruby 1.3.0.0 → 1.3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ext/zstdruby/libzstd/common/bitstream.h +40 -41
- data/ext/zstdruby/libzstd/common/compiler.h +85 -0
- data/ext/zstdruby/libzstd/common/error_private.c +8 -10
- data/ext/zstdruby/libzstd/common/error_private.h +4 -4
- data/ext/zstdruby/libzstd/common/fse.h +11 -5
- data/ext/zstdruby/libzstd/common/fse_decompress.c +3 -22
- data/ext/zstdruby/libzstd/common/huf.h +5 -6
- data/ext/zstdruby/libzstd/common/mem.h +6 -6
- data/ext/zstdruby/libzstd/common/pool.c +61 -27
- data/ext/zstdruby/libzstd/common/pool.h +10 -10
- data/ext/zstdruby/libzstd/common/threading.h +5 -6
- data/ext/zstdruby/libzstd/common/xxhash.c +28 -22
- data/ext/zstdruby/libzstd/common/zstd_common.c +4 -4
- data/ext/zstdruby/libzstd/common/zstd_errors.h +30 -32
- data/ext/zstdruby/libzstd/common/zstd_internal.h +57 -56
- data/ext/zstdruby/libzstd/compress/fse_compress.c +4 -22
- data/ext/zstdruby/libzstd/compress/huf_compress.c +4 -3
- data/ext/zstdruby/libzstd/compress/zstd_compress.c +314 -304
- data/ext/zstdruby/libzstd/compress/zstd_opt.h +118 -116
- data/ext/zstdruby/libzstd/compress/zstdmt_compress.c +223 -156
- data/ext/zstdruby/libzstd/compress/zstdmt_compress.h +10 -9
- data/ext/zstdruby/libzstd/decompress/huf_decompress.c +8 -24
- data/ext/zstdruby/libzstd/decompress/zstd_decompress.c +95 -115
- data/ext/zstdruby/libzstd/deprecated/zbuff.h +4 -4
- data/ext/zstdruby/libzstd/deprecated/zbuff_common.c +4 -5
- data/ext/zstdruby/libzstd/deprecated/zbuff_compress.c +4 -4
- data/ext/zstdruby/libzstd/deprecated/zbuff_decompress.c +4 -4
- data/ext/zstdruby/libzstd/dictBuilder/cover.c +7 -9
- data/ext/zstdruby/libzstd/dictBuilder/zdict.c +5 -5
- data/ext/zstdruby/libzstd/dictBuilder/zdict.h +4 -4
- data/ext/zstdruby/libzstd/legacy/zstd_legacy.h +8 -4
- data/ext/zstdruby/libzstd/legacy/zstd_v01.c +4 -4
- data/ext/zstdruby/libzstd/legacy/zstd_v01.h +4 -4
- data/ext/zstdruby/libzstd/legacy/zstd_v02.c +4 -4
- data/ext/zstdruby/libzstd/legacy/zstd_v02.h +4 -4
- data/ext/zstdruby/libzstd/legacy/zstd_v03.c +4 -4
- data/ext/zstdruby/libzstd/legacy/zstd_v03.h +4 -4
- data/ext/zstdruby/libzstd/legacy/zstd_v04.c +5 -5
- data/ext/zstdruby/libzstd/legacy/zstd_v04.h +4 -4
- data/ext/zstdruby/libzstd/legacy/zstd_v05.c +5 -5
- data/ext/zstdruby/libzstd/legacy/zstd_v05.h +4 -4
- data/ext/zstdruby/libzstd/legacy/zstd_v06.c +5 -5
- data/ext/zstdruby/libzstd/legacy/zstd_v06.h +4 -4
- data/ext/zstdruby/libzstd/legacy/zstd_v07.c +4 -4
- data/ext/zstdruby/libzstd/legacy/zstd_v07.h +4 -4
- data/ext/zstdruby/libzstd/zstd.h +16 -14
- data/lib/zstd-ruby/version.rb +1 -1
- metadata +3 -2
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
/* ***************************************************************
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
/*-*************************************
|
@@ -23,4 +23,3 @@ unsigned ZBUFF_isError(size_t errorCode) { return ERR_isError(errorCode); }
|
|
23
23
|
/*! ZBUFF_getErrorName() :
|
24
24
|
* provides error code string from function result (useful for debugging) */
|
25
25
|
const char* ZBUFF_getErrorName(size_t errorCode) { return ERR_getErrorName(errorCode); }
|
26
|
-
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
/* *****************************************************************************
|
@@ -714,11 +714,9 @@ typedef struct COVER_best_s {
|
|
714
714
|
* Initialize the `COVER_best_t`.
|
715
715
|
*/
|
716
716
|
static void COVER_best_init(COVER_best_t *best) {
|
717
|
-
if (
|
718
|
-
|
719
|
-
|
720
|
-
pthread_mutex_init(&best->mutex, NULL);
|
721
|
-
pthread_cond_init(&best->cond, NULL);
|
717
|
+
if (best==NULL) return; /* compatible with init on NULL */
|
718
|
+
(void)pthread_mutex_init(&best->mutex, NULL);
|
719
|
+
(void)pthread_cond_init(&best->cond, NULL);
|
722
720
|
best->liveJobs = 0;
|
723
721
|
best->dict = NULL;
|
724
722
|
best->dictSize = 0;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
|
@@ -695,7 +695,7 @@ static size_t ZDICT_analyzeEntropy(void* dstBuffer, size_t maxDstSize,
|
|
695
695
|
DISPLAYLEVEL(1, "Not enough memory \n");
|
696
696
|
goto _cleanup;
|
697
697
|
}
|
698
|
-
if (offcodeMax>OFFCODE_MAX) { eSize = ERROR(
|
698
|
+
if (offcodeMax>OFFCODE_MAX) { eSize = ERROR(dictionaryCreation_failed); goto _cleanup; } /* too large dictionary */
|
699
699
|
for (u=0; u<256; u++) countLit[u] = 1; /* any character must be described */
|
700
700
|
for (u=0; u<=offcodeMax; u++) offcodeCount[u] = 1;
|
701
701
|
for (u=0; u<=MaxML; u++) matchLengthCount[u] = 1;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
#ifndef DICTBUILDER_H_001
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
#ifndef ZSTD_LEGACY_H
|
@@ -123,6 +123,7 @@ MEM_STATIC size_t ZSTD_decompressLegacy(
|
|
123
123
|
const void* dict,size_t dictSize)
|
124
124
|
{
|
125
125
|
U32 const version = ZSTD_isLegacy(src, compressedSize);
|
126
|
+
(void)dst; (void)dstCapacity; (void)dict; (void)dictSize; /* unused when ZSTD_LEGACY_SUPPORT >= 8 */
|
126
127
|
switch(version)
|
127
128
|
{
|
128
129
|
#if (ZSTD_LEGACY_SUPPORT <= 1)
|
@@ -223,6 +224,7 @@ MEM_STATIC size_t ZSTD_freeLegacyStreamContext(void* legacyContext, U32 version)
|
|
223
224
|
case 1 :
|
224
225
|
case 2 :
|
225
226
|
case 3 :
|
227
|
+
(void)legacyContext;
|
226
228
|
return ERROR(version_unsupported);
|
227
229
|
#if (ZSTD_LEGACY_SUPPORT <= 4)
|
228
230
|
case 4 : return ZBUFFv04_freeDCtx((ZBUFFv04_DCtx*)legacyContext);
|
@@ -250,6 +252,7 @@ MEM_STATIC size_t ZSTD_initLegacyStream(void** legacyContext, U32 prevVersion, U
|
|
250
252
|
case 1 :
|
251
253
|
case 2 :
|
252
254
|
case 3 :
|
255
|
+
(void)dict; (void)dictSize;
|
253
256
|
return 0;
|
254
257
|
#if (ZSTD_LEGACY_SUPPORT <= 4)
|
255
258
|
case 4 :
|
@@ -306,6 +309,7 @@ MEM_STATIC size_t ZSTD_decompressLegacyStream(void* legacyContext, U32 version,
|
|
306
309
|
case 1 :
|
307
310
|
case 2 :
|
308
311
|
case 3 :
|
312
|
+
(void)legacyContext; (void)output; (void)input;
|
309
313
|
return ERROR(version_unsupported);
|
310
314
|
#if (ZSTD_LEGACY_SUPPORT <= 4)
|
311
315
|
case 4 :
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
#ifndef ZSTD_V01_H_28739879432
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
#ifndef ZSTD_V02_H_4174539423
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
#ifndef ZSTD_V03_H_298734209782
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
|
@@ -2776,7 +2776,7 @@ static size_t ZSTD_decodeFrameHeader_Part2(ZSTD_DCtx* zc, const void* src, size_
|
|
2776
2776
|
size_t result;
|
2777
2777
|
if (srcSize != zc->headerSize) return ERROR(srcSize_wrong);
|
2778
2778
|
result = ZSTD_getFrameParams(&(zc->params), src, srcSize);
|
2779
|
-
if ((MEM_32bits()) && (zc->params.windowLog > 25)) return ERROR(
|
2779
|
+
if ((MEM_32bits()) && (zc->params.windowLog > 25)) return ERROR(frameParameter_unsupported);
|
2780
2780
|
return result;
|
2781
2781
|
}
|
2782
2782
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
#ifndef ZSTD_V04_H_91868324769238
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
|
@@ -2888,7 +2888,7 @@ static size_t ZSTDv05_decodeFrameHeader_Part2(ZSTDv05_DCtx* zc, const void* src,
|
|
2888
2888
|
if (srcSize != zc->headerSize)
|
2889
2889
|
return ERROR(srcSize_wrong);
|
2890
2890
|
result = ZSTDv05_getFrameParams(&(zc->params), src, srcSize);
|
2891
|
-
if ((MEM_32bits()) && (zc->params.windowLog > 25)) return ERROR(
|
2891
|
+
if ((MEM_32bits()) && (zc->params.windowLog > 25)) return ERROR(frameParameter_unsupported);
|
2892
2892
|
return result;
|
2893
2893
|
}
|
2894
2894
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
#ifndef ZSTDv05_H
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
|
@@ -3084,7 +3084,7 @@ size_t ZSTDv06_getFrameParams(ZSTDv06_frameParams* fparamsPtr, const void* src,
|
|
3084
3084
|
static size_t ZSTDv06_decodeFrameHeader(ZSTDv06_DCtx* zc, const void* src, size_t srcSize)
|
3085
3085
|
{
|
3086
3086
|
size_t const result = ZSTDv06_getFrameParams(&(zc->fParams), src, srcSize);
|
3087
|
-
if ((MEM_32bits()) && (zc->fParams.windowLog > 25)) return ERROR(
|
3087
|
+
if ((MEM_32bits()) && (zc->fParams.windowLog > 25)) return ERROR(frameParameter_unsupported);
|
3088
3088
|
return result;
|
3089
3089
|
}
|
3090
3090
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
#ifndef ZSTDv06_H
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
9
|
|
10
10
|
#ifndef ZSTDv07_H_235446
|
data/ext/zstdruby/libzstd/zstd.h
CHANGED
@@ -2,11 +2,10 @@
|
|
2
2
|
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
* This source code is licensed under the BSD-style license found in the
|
6
|
-
* LICENSE file in the root directory of this source tree
|
7
|
-
*
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
8
8
|
*/
|
9
|
-
|
10
9
|
#if defined (__cplusplus)
|
11
10
|
extern "C" {
|
12
11
|
#endif
|
@@ -59,7 +58,7 @@ extern "C" {
|
|
59
58
|
/*------ Version ------*/
|
60
59
|
#define ZSTD_VERSION_MAJOR 1
|
61
60
|
#define ZSTD_VERSION_MINOR 3
|
62
|
-
#define ZSTD_VERSION_RELEASE
|
61
|
+
#define ZSTD_VERSION_RELEASE 1
|
63
62
|
|
64
63
|
#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE)
|
65
64
|
ZSTDLIB_API unsigned ZSTD_versionNumber(void); /**< useful to check dll version */
|
@@ -425,13 +424,6 @@ typedef struct {
|
|
425
424
|
ZSTD_frameParameters fParams;
|
426
425
|
} ZSTD_parameters;
|
427
426
|
|
428
|
-
typedef struct {
|
429
|
-
unsigned long long frameContentSize;
|
430
|
-
size_t windowSize;
|
431
|
-
unsigned dictID;
|
432
|
-
unsigned checksumFlag;
|
433
|
-
} ZSTD_frameHeader;
|
434
|
-
|
435
427
|
/*= Custom memory allocation functions */
|
436
428
|
typedef void* (*ZSTD_allocFunction) (void* opaque, size_t size);
|
437
429
|
typedef void (*ZSTD_freeFunction) (void* opaque, void* address);
|
@@ -809,7 +801,6 @@ ZSTDLIB_API size_t ZSTD_compressContinue(ZSTD_CCtx* cctx, void* dst, size_t dstC
|
|
809
801
|
ZSTDLIB_API size_t ZSTD_compressEnd(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
|
810
802
|
|
811
803
|
|
812
|
-
|
813
804
|
/*-
|
814
805
|
Buffer-less streaming decompression (synchronous mode)
|
815
806
|
|
@@ -874,6 +865,15 @@ ZSTDLIB_API size_t ZSTD_compressEnd(ZSTD_CCtx* cctx, void* dst, size_t dstCapaci
|
|
874
865
|
*/
|
875
866
|
|
876
867
|
/*===== Buffer-less streaming decompression functions =====*/
|
868
|
+
typedef enum { ZSTD_frame, ZSTD_skippableFrame } ZSTD_frameType_e;
|
869
|
+
typedef struct {
|
870
|
+
unsigned long long frameContentSize; /* ZSTD_CONTENTSIZE_UNKNOWN means this field is not available. 0 means "empty" */
|
871
|
+
unsigned long long windowSize; /* can be very large, up to <= frameContentSize */
|
872
|
+
ZSTD_frameType_e frameType; /* if == ZSTD_skippableFrame, frameContentSize is the size of skippable content */
|
873
|
+
unsigned headerSize;
|
874
|
+
unsigned dictID;
|
875
|
+
unsigned checksumFlag;
|
876
|
+
} ZSTD_frameHeader;
|
877
877
|
ZSTDLIB_API size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr, const void* src, size_t srcSize); /**< doesn't consume input */
|
878
878
|
ZSTDLIB_API size_t ZSTD_decompressBegin(ZSTD_DCtx* dctx);
|
879
879
|
ZSTDLIB_API size_t ZSTD_decompressBegin_usingDict(ZSTD_DCtx* dctx, const void* dict, size_t dictSize);
|
@@ -953,7 +953,9 @@ typedef enum {
|
|
953
953
|
* Special: value 0 means "do not change strategy". */
|
954
954
|
|
955
955
|
/* frame parameters */
|
956
|
-
ZSTD_p_contentSizeFlag=200, /* Content size is written into frame header _whenever known_ (default:1)
|
956
|
+
ZSTD_p_contentSizeFlag=200, /* Content size is written into frame header _whenever known_ (default:1)
|
957
|
+
* note that content size must be known at the beginning,
|
958
|
+
* it is sent using ZSTD_CCtx_setPledgedSrcSize() */
|
957
959
|
ZSTD_p_checksumFlag, /* A 32-bits checksum of content is written at end of frame (default:0) */
|
958
960
|
ZSTD_p_dictIDFlag, /* When applicable, dictID of dictionary is provided in frame header (default:1) */
|
959
961
|
|