multi_compress 0.3.2 → 0.3.4
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/CHANGELOG.md +17 -3
- data/GET_STARTED.md +3 -3
- data/README.md +75 -66
- data/THIRD_PARTY_NOTICES.md +24 -0
- data/ext/multi_compress/brotli_dec_static_init.c +3 -0
- data/ext/multi_compress/brotli_enc_static_init.c +3 -0
- data/ext/multi_compress/extconf.rb +79 -3
- data/ext/multi_compress/multi_compress.c +199 -120
- data/ext/multi_compress/vendor/.vendored +2 -2
- data/ext/multi_compress/vendor/brotli/LICENSE +19 -0
- data/ext/multi_compress/vendor/brotli/c/common/constants.c +7 -7
- data/ext/multi_compress/vendor/brotli/c/common/constants.h +2 -5
- data/ext/multi_compress/vendor/brotli/c/common/context.c +2 -2
- data/ext/multi_compress/vendor/brotli/c/common/context.h +1 -2
- data/ext/multi_compress/vendor/brotli/c/common/dictionary.c +4 -5856
- data/ext/multi_compress/vendor/brotli/c/common/dictionary.h +1 -2
- data/ext/multi_compress/vendor/brotli/c/common/dictionary_inc.h +5847 -0
- data/ext/multi_compress/vendor/brotli/c/common/platform.c +0 -4
- data/ext/multi_compress/vendor/brotli/c/common/platform.h +182 -43
- data/ext/multi_compress/vendor/brotli/c/common/shared_dictionary.c +3 -7
- data/ext/multi_compress/vendor/brotli/c/common/shared_dictionary_internal.h +1 -1
- data/ext/multi_compress/vendor/brotli/c/common/static_init.h +56 -0
- data/ext/multi_compress/vendor/brotli/c/common/transform.c +6 -4
- data/ext/multi_compress/vendor/brotli/c/common/transform.h +1 -2
- data/ext/multi_compress/vendor/brotli/c/common/version.h +3 -3
- data/ext/multi_compress/vendor/brotli/c/dec/bit_reader.c +2 -3
- data/ext/multi_compress/vendor/brotli/c/dec/bit_reader.h +0 -4
- data/ext/multi_compress/vendor/brotli/c/dec/decode.c +128 -39
- data/ext/multi_compress/vendor/brotli/c/dec/huffman.c +2 -5
- data/ext/multi_compress/vendor/brotli/c/dec/huffman.h +0 -2
- data/ext/multi_compress/vendor/brotli/c/dec/prefix.c +67 -0
- data/ext/multi_compress/vendor/brotli/c/dec/prefix.h +18 -708
- data/ext/multi_compress/vendor/brotli/c/dec/prefix_inc.h +707 -0
- data/ext/multi_compress/vendor/brotli/c/dec/state.c +18 -15
- data/ext/multi_compress/vendor/brotli/c/dec/state.h +2 -6
- data/ext/multi_compress/vendor/brotli/c/dec/static_init.c +53 -0
- data/ext/multi_compress/vendor/brotli/c/dec/static_init.h +30 -0
- data/ext/multi_compress/vendor/brotli/c/enc/backward_references.c +32 -8
- data/ext/multi_compress/vendor/brotli/c/enc/backward_references.h +1 -5
- data/ext/multi_compress/vendor/brotli/c/enc/backward_references_hq.c +15 -15
- data/ext/multi_compress/vendor/brotli/c/enc/backward_references_hq.h +1 -5
- data/ext/multi_compress/vendor/brotli/c/enc/bit_cost.c +28 -4
- data/ext/multi_compress/vendor/brotli/c/enc/bit_cost.h +8 -40
- data/ext/multi_compress/vendor/brotli/c/enc/bit_cost_inc.h +1 -1
- data/ext/multi_compress/vendor/brotli/c/enc/block_splitter.c +9 -12
- data/ext/multi_compress/vendor/brotli/c/enc/block_splitter.h +0 -3
- data/ext/multi_compress/vendor/brotli/c/enc/block_splitter_inc.h +14 -8
- data/ext/multi_compress/vendor/brotli/c/enc/brotli_bit_stream.c +10 -9
- data/ext/multi_compress/vendor/brotli/c/enc/brotli_bit_stream.h +0 -6
- data/ext/multi_compress/vendor/brotli/c/enc/cluster.c +0 -2
- data/ext/multi_compress/vendor/brotli/c/enc/cluster.h +0 -2
- data/ext/multi_compress/vendor/brotli/c/enc/command.c +1 -1
- data/ext/multi_compress/vendor/brotli/c/enc/command.h +8 -10
- data/ext/multi_compress/vendor/brotli/c/enc/compound_dictionary.c +3 -5
- data/ext/multi_compress/vendor/brotli/c/enc/compound_dictionary.h +1 -4
- data/ext/multi_compress/vendor/brotli/c/enc/compress_fragment.c +3 -13
- data/ext/multi_compress/vendor/brotli/c/enc/compress_fragment.h +0 -2
- data/ext/multi_compress/vendor/brotli/c/enc/compress_fragment_two_pass.c +5 -15
- data/ext/multi_compress/vendor/brotli/c/enc/compress_fragment_two_pass.h +0 -2
- data/ext/multi_compress/vendor/brotli/c/enc/dictionary_hash.c +127 -1830
- data/ext/multi_compress/vendor/brotli/c/enc/dictionary_hash.h +23 -3
- data/ext/multi_compress/vendor/brotli/c/enc/dictionary_hash_inc.h +1829 -0
- data/ext/multi_compress/vendor/brotli/c/enc/encode.c +77 -52
- data/ext/multi_compress/vendor/brotli/c/enc/encoder_dict.c +9 -7
- data/ext/multi_compress/vendor/brotli/c/enc/encoder_dict.h +2 -4
- data/ext/multi_compress/vendor/brotli/c/enc/entropy_encode.c +3 -6
- data/ext/multi_compress/vendor/brotli/c/enc/entropy_encode.h +2 -4
- data/ext/multi_compress/vendor/brotli/c/enc/entropy_encode_static.h +18 -12
- data/ext/multi_compress/vendor/brotli/c/enc/fast_log.c +1 -1
- data/ext/multi_compress/vendor/brotli/c/enc/fast_log.h +2 -3
- data/ext/multi_compress/vendor/brotli/c/enc/find_match_length.h +0 -2
- data/ext/multi_compress/vendor/brotli/c/enc/hash.h +38 -31
- data/ext/multi_compress/vendor/brotli/c/enc/hash_base.h +38 -0
- data/ext/multi_compress/vendor/brotli/c/enc/hash_forgetful_chain_inc.h +11 -1
- data/ext/multi_compress/vendor/brotli/c/enc/hash_longest_match64_inc.h +24 -7
- data/ext/multi_compress/vendor/brotli/c/enc/hash_longest_match64_simd_inc.h +304 -0
- data/ext/multi_compress/vendor/brotli/c/enc/hash_longest_match_inc.h +30 -11
- data/ext/multi_compress/vendor/brotli/c/enc/hash_longest_match_quickly_inc.h +4 -0
- data/ext/multi_compress/vendor/brotli/c/enc/hash_longest_match_simd_inc.h +278 -0
- data/ext/multi_compress/vendor/brotli/c/enc/histogram.c +1 -0
- data/ext/multi_compress/vendor/brotli/c/enc/histogram.h +0 -4
- data/ext/multi_compress/vendor/brotli/c/enc/literal_cost.c +4 -6
- data/ext/multi_compress/vendor/brotli/c/enc/literal_cost.h +0 -2
- data/ext/multi_compress/vendor/brotli/c/enc/matching_tag_mask.h +69 -0
- data/ext/multi_compress/vendor/brotli/c/enc/memory.c +0 -5
- data/ext/multi_compress/vendor/brotli/c/enc/memory.h +0 -4
- data/ext/multi_compress/vendor/brotli/c/enc/metablock.c +7 -9
- data/ext/multi_compress/vendor/brotli/c/enc/metablock.h +3 -3
- data/ext/multi_compress/vendor/brotli/c/enc/metablock_inc.h +4 -4
- data/ext/multi_compress/vendor/brotli/c/enc/params.h +0 -1
- data/ext/multi_compress/vendor/brotli/c/enc/prefix.h +0 -2
- data/ext/multi_compress/vendor/brotli/c/enc/quality.h +17 -10
- data/ext/multi_compress/vendor/brotli/c/enc/ringbuffer.h +1 -4
- data/ext/multi_compress/vendor/brotli/c/enc/state.h +2 -2
- data/ext/multi_compress/vendor/brotli/c/enc/static_dict.c +5 -11
- data/ext/multi_compress/vendor/brotli/c/enc/static_dict.h +1 -3
- data/ext/multi_compress/vendor/brotli/c/enc/static_dict_lut.c +224 -0
- data/ext/multi_compress/vendor/brotli/c/enc/static_dict_lut.h +20 -5837
- data/ext/multi_compress/vendor/brotli/c/enc/static_dict_lut_inc.h +5830 -0
- data/ext/multi_compress/vendor/brotli/c/enc/static_init.c +59 -0
- data/ext/multi_compress/vendor/brotli/c/enc/static_init.h +30 -0
- data/ext/multi_compress/vendor/brotli/c/enc/static_init_lazy.cc +26 -0
- data/ext/multi_compress/vendor/brotli/c/enc/utf8_util.c +1 -1
- data/ext/multi_compress/vendor/brotli/c/enc/utf8_util.h +0 -2
- data/ext/multi_compress/vendor/brotli/c/enc/write_bits.h +0 -2
- data/ext/multi_compress/vendor/brotli/c/include/brotli/decode.h +1 -1
- data/ext/multi_compress/vendor/brotli/c/include/brotli/encode.h +5 -1
- data/ext/multi_compress/vendor/brotli/c/include/brotli/port.h +4 -7
- data/ext/multi_compress/vendor/brotli/c/include/brotli/types.h +2 -2
- data/ext/multi_compress/vendor/lz4/LICENSE +12 -0
- data/ext/multi_compress/vendor/zstd/COPYING +339 -0
- data/ext/multi_compress/vendor/zstd/LICENSE +30 -0
- data/ext/multi_compress/vendor/zstd/lib/Makefile +67 -35
- data/ext/multi_compress/vendor/zstd/lib/README.md +33 -2
- data/ext/multi_compress/vendor/zstd/lib/common/allocations.h +55 -0
- data/ext/multi_compress/vendor/zstd/lib/common/bits.h +205 -0
- data/ext/multi_compress/vendor/zstd/lib/common/bitstream.h +84 -108
- data/ext/multi_compress/vendor/zstd/lib/common/compiler.h +170 -41
- data/ext/multi_compress/vendor/zstd/lib/common/cpu.h +37 -1
- data/ext/multi_compress/vendor/zstd/lib/common/debug.c +7 -1
- data/ext/multi_compress/vendor/zstd/lib/common/debug.h +21 -21
- data/ext/multi_compress/vendor/zstd/lib/common/entropy_common.c +12 -40
- data/ext/multi_compress/vendor/zstd/lib/common/error_private.c +10 -2
- data/ext/multi_compress/vendor/zstd/lib/common/error_private.h +46 -47
- data/ext/multi_compress/vendor/zstd/lib/common/fse.h +8 -100
- data/ext/multi_compress/vendor/zstd/lib/common/fse_decompress.c +28 -116
- data/ext/multi_compress/vendor/zstd/lib/common/huf.h +79 -166
- data/ext/multi_compress/vendor/zstd/lib/common/mem.h +46 -66
- data/ext/multi_compress/vendor/zstd/lib/common/pool.c +27 -11
- data/ext/multi_compress/vendor/zstd/lib/common/pool.h +8 -11
- data/ext/multi_compress/vendor/zstd/lib/common/portability_macros.h +45 -11
- data/ext/multi_compress/vendor/zstd/lib/common/threading.c +74 -14
- data/ext/multi_compress/vendor/zstd/lib/common/threading.h +5 -18
- data/ext/multi_compress/vendor/zstd/lib/common/xxhash.c +5 -11
- data/ext/multi_compress/vendor/zstd/lib/common/xxhash.h +2411 -1003
- data/ext/multi_compress/vendor/zstd/lib/common/zstd_common.c +1 -36
- data/ext/multi_compress/vendor/zstd/lib/common/zstd_deps.h +13 -1
- data/ext/multi_compress/vendor/zstd/lib/common/zstd_internal.h +13 -182
- data/ext/multi_compress/vendor/zstd/lib/common/zstd_trace.h +6 -13
- data/ext/multi_compress/vendor/zstd/lib/compress/clevels.h +1 -1
- data/ext/multi_compress/vendor/zstd/lib/compress/fse_compress.c +15 -131
- data/ext/multi_compress/vendor/zstd/lib/compress/hist.c +11 -1
- data/ext/multi_compress/vendor/zstd/lib/compress/hist.h +8 -1
- data/ext/multi_compress/vendor/zstd/lib/compress/huf_compress.c +283 -189
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_compress.c +2419 -903
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_compress_internal.h +423 -245
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_compress_literals.c +116 -40
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_compress_literals.h +16 -8
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_compress_sequences.c +10 -10
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_compress_sequences.h +8 -7
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_compress_superblock.c +254 -139
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_compress_superblock.h +1 -1
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_cwksp.h +184 -95
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_double_fast.c +163 -81
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_double_fast.h +18 -14
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_fast.c +507 -197
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_fast.h +7 -14
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_lazy.c +579 -484
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_lazy.h +133 -65
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_ldm.c +61 -40
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_ldm.h +7 -15
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_ldm_geartab.h +1 -1
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_opt.c +352 -218
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_opt.h +37 -21
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_preSplit.c +238 -0
- data/ext/multi_compress/vendor/zstd/lib/compress/zstd_preSplit.h +33 -0
- data/ext/multi_compress/vendor/zstd/lib/compress/zstdmt_compress.c +239 -175
- data/ext/multi_compress/vendor/zstd/lib/compress/zstdmt_compress.h +5 -16
- data/ext/multi_compress/vendor/zstd/lib/decompress/huf_decompress.c +543 -488
- data/ext/multi_compress/vendor/zstd/lib/decompress/huf_decompress_amd64.S +78 -61
- data/ext/multi_compress/vendor/zstd/lib/decompress/zstd_ddict.c +4 -4
- data/ext/multi_compress/vendor/zstd/lib/decompress/zstd_ddict.h +1 -1
- data/ext/multi_compress/vendor/zstd/lib/decompress/zstd_decompress.c +295 -115
- data/ext/multi_compress/vendor/zstd/lib/decompress/zstd_decompress_block.c +430 -293
- data/ext/multi_compress/vendor/zstd/lib/decompress/zstd_decompress_block.h +7 -2
- data/ext/multi_compress/vendor/zstd/lib/decompress/zstd_decompress_internal.h +11 -7
- data/ext/multi_compress/vendor/zstd/lib/deprecated/zbuff.h +1 -1
- data/ext/multi_compress/vendor/zstd/lib/deprecated/zbuff_common.c +1 -1
- data/ext/multi_compress/vendor/zstd/lib/deprecated/zbuff_compress.c +1 -1
- data/ext/multi_compress/vendor/zstd/lib/deprecated/zbuff_decompress.c +3 -1
- data/ext/multi_compress/vendor/zstd/lib/dictBuilder/cover.c +95 -46
- data/ext/multi_compress/vendor/zstd/lib/dictBuilder/cover.h +3 -9
- data/ext/multi_compress/vendor/zstd/lib/dictBuilder/divsufsort.h +0 -10
- data/ext/multi_compress/vendor/zstd/lib/dictBuilder/fastcover.c +4 -4
- data/ext/multi_compress/vendor/zstd/lib/dictBuilder/zdict.c +25 -97
- data/ext/multi_compress/vendor/zstd/lib/dll/example/Makefile +1 -1
- data/ext/multi_compress/vendor/zstd/lib/dll/example/README.md +1 -1
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_legacy.h +38 -1
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v01.c +19 -50
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v01.h +1 -1
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v02.c +27 -80
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v02.h +1 -1
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v03.c +28 -83
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v03.h +1 -1
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v04.c +25 -74
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v04.h +1 -1
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v05.c +31 -76
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v05.h +1 -1
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v06.c +44 -88
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v06.h +1 -1
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v07.c +33 -84
- data/ext/multi_compress/vendor/zstd/lib/legacy/zstd_v07.h +1 -1
- data/ext/multi_compress/vendor/zstd/lib/libzstd.mk +65 -33
- data/ext/multi_compress/vendor/zstd/lib/libzstd.pc.in +5 -5
- data/ext/multi_compress/vendor/zstd/lib/module.modulemap +13 -3
- data/ext/multi_compress/vendor/zstd/lib/zdict.h +65 -36
- data/ext/multi_compress/vendor/zstd/lib/zstd.h +890 -267
- data/ext/multi_compress/vendor/zstd/lib/zstd_errors.h +28 -16
- data/lib/multi_compress/version.rb +1 -1
- data/lib/multi_compress.rb +80 -41
- metadata +29 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under both the BSD-style license (found in the
|
|
@@ -47,7 +47,7 @@ typedef enum {
|
|
|
47
47
|
*/
|
|
48
48
|
size_t ZSTD_decompressBlock_internal(ZSTD_DCtx* dctx,
|
|
49
49
|
void* dst, size_t dstCapacity,
|
|
50
|
-
const void* src, size_t srcSize, const
|
|
50
|
+
const void* src, size_t srcSize, const streaming_operation streaming);
|
|
51
51
|
|
|
52
52
|
/* ZSTD_buildFSETable() :
|
|
53
53
|
* generate FSE decoding table for one symbol (ll, ml or off)
|
|
@@ -64,5 +64,10 @@ void ZSTD_buildFSETable(ZSTD_seqSymbol* dt,
|
|
|
64
64
|
unsigned tableLog, void* wksp, size_t wkspSize,
|
|
65
65
|
int bmi2);
|
|
66
66
|
|
|
67
|
+
/* Internal definition of ZSTD_decompressBlock() to avoid deprecation warnings. */
|
|
68
|
+
size_t ZSTD_decompressBlock_deprecated(ZSTD_DCtx* dctx,
|
|
69
|
+
void* dst, size_t dstCapacity,
|
|
70
|
+
const void* src, size_t srcSize);
|
|
71
|
+
|
|
67
72
|
|
|
68
73
|
#endif /* ZSTD_DEC_BLOCK_H */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under both the BSD-style license (found in the
|
|
@@ -75,12 +75,13 @@ static UNUSED_ATTR const U32 ML_base[MaxML+1] = {
|
|
|
75
75
|
|
|
76
76
|
#define ZSTD_BUILD_FSE_TABLE_WKSP_SIZE (sizeof(S16) * (MaxSeq + 1) + (1u << MaxFSELog) + sizeof(U64))
|
|
77
77
|
#define ZSTD_BUILD_FSE_TABLE_WKSP_SIZE_U32 ((ZSTD_BUILD_FSE_TABLE_WKSP_SIZE + sizeof(U32) - 1) / sizeof(U32))
|
|
78
|
+
#define ZSTD_HUFFDTABLE_CAPACITY_LOG 12
|
|
78
79
|
|
|
79
80
|
typedef struct {
|
|
80
81
|
ZSTD_seqSymbol LLTable[SEQSYMBOL_TABLE_SIZE(LLFSELog)]; /* Note : Space reserved for FSE Tables */
|
|
81
82
|
ZSTD_seqSymbol OFTable[SEQSYMBOL_TABLE_SIZE(OffFSELog)]; /* is also used as temporary workspace while building hufTable during DDict creation */
|
|
82
83
|
ZSTD_seqSymbol MLTable[SEQSYMBOL_TABLE_SIZE(MLFSELog)]; /* and therefore must be at least HUF_DECOMPRESS_WORKSPACE_SIZE large */
|
|
83
|
-
HUF_DTable hufTable[HUF_DTABLE_SIZE(
|
|
84
|
+
HUF_DTable hufTable[HUF_DTABLE_SIZE(ZSTD_HUFFDTABLE_CAPACITY_LOG)]; /* can accommodate HUF_decompress4X */
|
|
84
85
|
U32 rep[ZSTD_REP_NUM];
|
|
85
86
|
U32 workspace[ZSTD_BUILD_FSE_TABLE_WKSP_SIZE_U32];
|
|
86
87
|
} ZSTD_entropyDTables_t;
|
|
@@ -135,7 +136,7 @@ struct ZSTD_DCtx_s
|
|
|
135
136
|
const void* virtualStart; /* virtual start of previous segment if it was just before current one */
|
|
136
137
|
const void* dictEnd; /* end of previous segment */
|
|
137
138
|
size_t expected;
|
|
138
|
-
|
|
139
|
+
ZSTD_FrameHeader fParams;
|
|
139
140
|
U64 processedCSize;
|
|
140
141
|
U64 decodedSize;
|
|
141
142
|
blockType_e bType; /* used in ZSTD_decompressContinue(), store blockType between block header decoding and block decompression stages */
|
|
@@ -152,7 +153,8 @@ struct ZSTD_DCtx_s
|
|
|
152
153
|
size_t litSize;
|
|
153
154
|
size_t rleSize;
|
|
154
155
|
size_t staticSize;
|
|
155
|
-
|
|
156
|
+
int isFrameDecompression;
|
|
157
|
+
#if DYNAMIC_BMI2
|
|
156
158
|
int bmi2; /* == 1 if the CPU supports BMI2 and 0 otherwise. CPU support is determined dynamically once per context lifetime. */
|
|
157
159
|
#endif
|
|
158
160
|
|
|
@@ -164,6 +166,8 @@ struct ZSTD_DCtx_s
|
|
|
164
166
|
ZSTD_dictUses_e dictUses;
|
|
165
167
|
ZSTD_DDictHashSet* ddictSet; /* Hash set for multiple ddicts */
|
|
166
168
|
ZSTD_refMultipleDDicts_e refMultipleDDicts; /* User specified: if == 1, will allow references to multiple DDicts. Default == 0 (disabled) */
|
|
169
|
+
int disableHufAsm;
|
|
170
|
+
int maxBlockSizeParam;
|
|
167
171
|
|
|
168
172
|
/* streaming */
|
|
169
173
|
ZSTD_dStreamStage streamStage;
|
|
@@ -207,11 +211,11 @@ struct ZSTD_DCtx_s
|
|
|
207
211
|
}; /* typedef'd to ZSTD_DCtx within "zstd.h" */
|
|
208
212
|
|
|
209
213
|
MEM_STATIC int ZSTD_DCtx_get_bmi2(const struct ZSTD_DCtx_s *dctx) {
|
|
210
|
-
#if DYNAMIC_BMI2
|
|
211
|
-
|
|
214
|
+
#if DYNAMIC_BMI2
|
|
215
|
+
return dctx->bmi2;
|
|
212
216
|
#else
|
|
213
217
|
(void)dctx;
|
|
214
|
-
|
|
218
|
+
return 0;
|
|
215
219
|
#endif
|
|
216
220
|
}
|
|
217
221
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under both the BSD-style license (found in the
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
/* *************************************
|
|
14
14
|
* Dependencies
|
|
15
15
|
***************************************/
|
|
16
|
+
#define ZSTD_DISABLE_DEPRECATE_WARNINGS /* suppress warning on ZSTD_initDStream_usingDict */
|
|
17
|
+
#include "../zstd.h" /* ZSTD_CStream, ZSTD_DStream, ZSTDLIB_API */
|
|
16
18
|
#define ZBUFF_STATIC_LINKING_ONLY
|
|
17
19
|
#include "zbuff.h"
|
|
18
20
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under both the BSD-style license (found in the
|
|
@@ -21,8 +21,17 @@
|
|
|
21
21
|
/*-*************************************
|
|
22
22
|
* Dependencies
|
|
23
23
|
***************************************/
|
|
24
|
+
/* qsort_r is an extension. */
|
|
25
|
+
#if defined(__linux) || defined(__linux__) || defined(linux) || defined(__gnu_linux__) || \
|
|
26
|
+
defined(__CYGWIN__) || defined(__MSYS__)
|
|
27
|
+
#if !defined(_GNU_SOURCE) && !defined(__ANDROID__) /* NDK doesn't ship qsort_r(). */
|
|
28
|
+
#define _GNU_SOURCE
|
|
29
|
+
#endif
|
|
30
|
+
#endif
|
|
31
|
+
|
|
24
32
|
#include <stdio.h> /* fprintf */
|
|
25
|
-
#include <stdlib.h> /* malloc, free,
|
|
33
|
+
#include <stdlib.h> /* malloc, free, qsort_r */
|
|
34
|
+
|
|
26
35
|
#include <string.h> /* memset */
|
|
27
36
|
#include <time.h> /* clock */
|
|
28
37
|
|
|
@@ -31,9 +40,10 @@
|
|
|
31
40
|
#endif
|
|
32
41
|
|
|
33
42
|
#include "../common/mem.h" /* read */
|
|
34
|
-
#include "../common/pool.h"
|
|
35
|
-
#include "../common/threading.h"
|
|
43
|
+
#include "../common/pool.h" /* POOL_ctx */
|
|
44
|
+
#include "../common/threading.h" /* ZSTD_pthread_mutex_t */
|
|
36
45
|
#include "../common/zstd_internal.h" /* includes zstd.h */
|
|
46
|
+
#include "../common/bits.h" /* ZSTD_highbit32 */
|
|
37
47
|
#include "../zdict.h"
|
|
38
48
|
#include "cover.h"
|
|
39
49
|
|
|
@@ -77,7 +87,7 @@ static clock_t g_time = 0;
|
|
|
77
87
|
#undef LOCALDISPLAYUPDATE
|
|
78
88
|
#define LOCALDISPLAYUPDATE(displayLevel, l, ...) \
|
|
79
89
|
if (displayLevel >= l) { \
|
|
80
|
-
if ((clock() - g_time > g_refreshRate) || (displayLevel >= 4)) {
|
|
90
|
+
if ((clock() - g_time > g_refreshRate) || (displayLevel >= 4)) { \
|
|
81
91
|
g_time = clock(); \
|
|
82
92
|
DISPLAY(__VA_ARGS__); \
|
|
83
93
|
} \
|
|
@@ -231,8 +241,10 @@ typedef struct {
|
|
|
231
241
|
unsigned d;
|
|
232
242
|
} COVER_ctx_t;
|
|
233
243
|
|
|
234
|
-
|
|
244
|
+
#if !defined(_GNU_SOURCE) && !defined(__APPLE__) && !defined(_MSC_VER)
|
|
245
|
+
/* C90 only offers qsort() that needs a global context. */
|
|
235
246
|
static COVER_ctx_t *g_coverCtx = NULL;
|
|
247
|
+
#endif
|
|
236
248
|
|
|
237
249
|
/*-*************************************
|
|
238
250
|
* Helper functions
|
|
@@ -275,11 +287,15 @@ static int COVER_cmp8(COVER_ctx_t *ctx, const void *lp, const void *rp) {
|
|
|
275
287
|
|
|
276
288
|
/**
|
|
277
289
|
* Same as COVER_cmp() except ties are broken by pointer value
|
|
278
|
-
* NOTE: g_coverCtx must be set to call this function. A global is required because
|
|
279
|
-
* qsort doesn't take an opaque pointer.
|
|
280
290
|
*/
|
|
281
|
-
|
|
282
|
-
|
|
291
|
+
#if (defined(_WIN32) && defined(_MSC_VER)) || defined(__APPLE__)
|
|
292
|
+
static int WIN_CDECL COVER_strict_cmp(void* g_coverCtx, const void* lp, const void* rp) {
|
|
293
|
+
#elif defined(_GNU_SOURCE)
|
|
294
|
+
static int COVER_strict_cmp(const void *lp, const void *rp, void *g_coverCtx) {
|
|
295
|
+
#else /* C90 fallback.*/
|
|
296
|
+
static int COVER_strict_cmp(const void *lp, const void *rp) {
|
|
297
|
+
#endif
|
|
298
|
+
int result = COVER_cmp((COVER_ctx_t*)g_coverCtx, lp, rp);
|
|
283
299
|
if (result == 0) {
|
|
284
300
|
result = lp < rp ? -1 : 1;
|
|
285
301
|
}
|
|
@@ -288,21 +304,58 @@ static int WIN_CDECL COVER_strict_cmp(const void *lp, const void *rp) {
|
|
|
288
304
|
/**
|
|
289
305
|
* Faster version for d <= 8.
|
|
290
306
|
*/
|
|
291
|
-
|
|
292
|
-
|
|
307
|
+
#if (defined(_WIN32) && defined(_MSC_VER)) || defined(__APPLE__)
|
|
308
|
+
static int WIN_CDECL COVER_strict_cmp8(void* g_coverCtx, const void* lp, const void* rp) {
|
|
309
|
+
#elif defined(_GNU_SOURCE)
|
|
310
|
+
static int COVER_strict_cmp8(const void *lp, const void *rp, void *g_coverCtx) {
|
|
311
|
+
#else /* C90 fallback.*/
|
|
312
|
+
static int COVER_strict_cmp8(const void *lp, const void *rp) {
|
|
313
|
+
#endif
|
|
314
|
+
int result = COVER_cmp8((COVER_ctx_t*)g_coverCtx, lp, rp);
|
|
293
315
|
if (result == 0) {
|
|
294
316
|
result = lp < rp ? -1 : 1;
|
|
295
317
|
}
|
|
296
318
|
return result;
|
|
297
319
|
}
|
|
298
320
|
|
|
321
|
+
/**
|
|
322
|
+
* Abstract away divergence of qsort_r() parameters.
|
|
323
|
+
* Hopefully when C11 become the norm, we will be able
|
|
324
|
+
* to clean it up.
|
|
325
|
+
*/
|
|
326
|
+
static void stableSort(COVER_ctx_t *ctx) {
|
|
327
|
+
#if defined(__APPLE__)
|
|
328
|
+
qsort_r(ctx->suffix, ctx->suffixSize, sizeof(U32),
|
|
329
|
+
ctx,
|
|
330
|
+
(ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp));
|
|
331
|
+
#elif defined(_GNU_SOURCE)
|
|
332
|
+
qsort_r(ctx->suffix, ctx->suffixSize, sizeof(U32),
|
|
333
|
+
(ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp),
|
|
334
|
+
ctx);
|
|
335
|
+
#elif defined(_WIN32) && defined(_MSC_VER)
|
|
336
|
+
qsort_s(ctx->suffix, ctx->suffixSize, sizeof(U32),
|
|
337
|
+
(ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp),
|
|
338
|
+
ctx);
|
|
339
|
+
#elif defined(__OpenBSD__)
|
|
340
|
+
g_coverCtx = ctx;
|
|
341
|
+
mergesort(ctx->suffix, ctx->suffixSize, sizeof(U32),
|
|
342
|
+
(ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp));
|
|
343
|
+
#else /* C90 fallback.*/
|
|
344
|
+
g_coverCtx = ctx;
|
|
345
|
+
/* TODO(cavalcanti): implement a reentrant qsort() when is not available. */
|
|
346
|
+
qsort(ctx->suffix, ctx->suffixSize, sizeof(U32),
|
|
347
|
+
(ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp));
|
|
348
|
+
#endif
|
|
349
|
+
}
|
|
350
|
+
|
|
299
351
|
/**
|
|
300
352
|
* Returns the first pointer in [first, last) whose element does not compare
|
|
301
353
|
* less than value. If no such element exists it returns last.
|
|
302
354
|
*/
|
|
303
|
-
static const size_t *COVER_lower_bound(const size_t
|
|
355
|
+
static const size_t *COVER_lower_bound(const size_t* first, const size_t* last,
|
|
304
356
|
size_t value) {
|
|
305
|
-
size_t count = last - first;
|
|
357
|
+
size_t count = (size_t)(last - first);
|
|
358
|
+
assert(last >= first);
|
|
306
359
|
while (count != 0) {
|
|
307
360
|
size_t step = count / 2;
|
|
308
361
|
const size_t *ptr = first;
|
|
@@ -541,14 +594,15 @@ static void COVER_ctx_destroy(COVER_ctx_t *ctx) {
|
|
|
541
594
|
|
|
542
595
|
/**
|
|
543
596
|
* Prepare a context for dictionary building.
|
|
544
|
-
* The context is only dependent on the parameter `d` and can used multiple
|
|
597
|
+
* The context is only dependent on the parameter `d` and can be used multiple
|
|
545
598
|
* times.
|
|
546
599
|
* Returns 0 on success or error code on error.
|
|
547
600
|
* The context must be destroyed with `COVER_ctx_destroy()`.
|
|
548
601
|
*/
|
|
549
602
|
static size_t COVER_ctx_init(COVER_ctx_t *ctx, const void *samplesBuffer,
|
|
550
603
|
const size_t *samplesSizes, unsigned nbSamples,
|
|
551
|
-
unsigned d, double splitPoint)
|
|
604
|
+
unsigned d, double splitPoint)
|
|
605
|
+
{
|
|
552
606
|
const BYTE *const samples = (const BYTE *)samplesBuffer;
|
|
553
607
|
const size_t totalSamplesSize = COVER_sum(samplesSizes, nbSamples);
|
|
554
608
|
/* Split samples into testing and training sets */
|
|
@@ -617,17 +671,7 @@ static size_t COVER_ctx_init(COVER_ctx_t *ctx, const void *samplesBuffer,
|
|
|
617
671
|
for (i = 0; i < ctx->suffixSize; ++i) {
|
|
618
672
|
ctx->suffix[i] = i;
|
|
619
673
|
}
|
|
620
|
-
|
|
621
|
-
* On OpenBSD qsort() is not guaranteed to be stable, their mergesort() is.
|
|
622
|
-
*/
|
|
623
|
-
g_coverCtx = ctx;
|
|
624
|
-
#if defined(__OpenBSD__)
|
|
625
|
-
mergesort(ctx->suffix, ctx->suffixSize, sizeof(U32),
|
|
626
|
-
(ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp));
|
|
627
|
-
#else
|
|
628
|
-
qsort(ctx->suffix, ctx->suffixSize, sizeof(U32),
|
|
629
|
-
(ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp));
|
|
630
|
-
#endif
|
|
674
|
+
stableSort(ctx);
|
|
631
675
|
}
|
|
632
676
|
DISPLAYLEVEL(2, "Computing frequencies\n");
|
|
633
677
|
/* For each dmer group (group of positions with the same first d bytes):
|
|
@@ -646,7 +690,7 @@ static size_t COVER_ctx_init(COVER_ctx_t *ctx, const void *samplesBuffer,
|
|
|
646
690
|
|
|
647
691
|
void COVER_warnOnSmallCorpus(size_t maxDictSize, size_t nbDmers, int displayLevel)
|
|
648
692
|
{
|
|
649
|
-
const double ratio = (double)nbDmers / maxDictSize;
|
|
693
|
+
const double ratio = (double)nbDmers / (double)maxDictSize;
|
|
650
694
|
if (ratio >= 10) {
|
|
651
695
|
return;
|
|
652
696
|
}
|
|
@@ -732,7 +776,7 @@ static size_t COVER_buildDictionary(const COVER_ctx_t *ctx, U32 *freqs,
|
|
|
732
776
|
return tail;
|
|
733
777
|
}
|
|
734
778
|
|
|
735
|
-
|
|
779
|
+
ZDICTLIB_STATIC_API size_t ZDICT_trainFromBuffer_cover(
|
|
736
780
|
void *dictBuffer, size_t dictBufferCapacity,
|
|
737
781
|
const void *samplesBuffer, const size_t *samplesSizes, unsigned nbSamples,
|
|
738
782
|
ZDICT_cover_params_t parameters)
|
|
@@ -906,8 +950,10 @@ void COVER_best_start(COVER_best_t *best) {
|
|
|
906
950
|
* Decrements liveJobs and signals any waiting threads if liveJobs == 0.
|
|
907
951
|
* If this dictionary is the best so far save it and its parameters.
|
|
908
952
|
*/
|
|
909
|
-
void COVER_best_finish(COVER_best_t
|
|
910
|
-
|
|
953
|
+
void COVER_best_finish(COVER_best_t* best,
|
|
954
|
+
ZDICT_cover_params_t parameters,
|
|
955
|
+
COVER_dictSelection_t selection)
|
|
956
|
+
{
|
|
911
957
|
void* dict = selection.dictContent;
|
|
912
958
|
size_t compressedSize = selection.totalCompressedSize;
|
|
913
959
|
size_t dictSize = selection.dictSize;
|
|
@@ -950,9 +996,17 @@ void COVER_best_finish(COVER_best_t *best, ZDICT_cover_params_t parameters,
|
|
|
950
996
|
}
|
|
951
997
|
}
|
|
952
998
|
|
|
999
|
+
static COVER_dictSelection_t setDictSelection(BYTE* buf, size_t s, size_t csz)
|
|
1000
|
+
{
|
|
1001
|
+
COVER_dictSelection_t ds;
|
|
1002
|
+
ds.dictContent = buf;
|
|
1003
|
+
ds.dictSize = s;
|
|
1004
|
+
ds.totalCompressedSize = csz;
|
|
1005
|
+
return ds;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
953
1008
|
COVER_dictSelection_t COVER_dictSelectionError(size_t error) {
|
|
954
|
-
|
|
955
|
-
return selection;
|
|
1009
|
+
return setDictSelection(NULL, 0, error);
|
|
956
1010
|
}
|
|
957
1011
|
|
|
958
1012
|
unsigned COVER_dictSelectionIsError(COVER_dictSelection_t selection) {
|
|
@@ -971,8 +1025,8 @@ COVER_dictSelection_t COVER_selectDict(BYTE* customDictContent, size_t dictBuffe
|
|
|
971
1025
|
size_t largestCompressed = 0;
|
|
972
1026
|
BYTE* customDictContentEnd = customDictContent + dictContentSize;
|
|
973
1027
|
|
|
974
|
-
BYTE
|
|
975
|
-
BYTE
|
|
1028
|
+
BYTE* largestDictbuffer = (BYTE*)malloc(dictBufferCapacity);
|
|
1029
|
+
BYTE* candidateDictBuffer = (BYTE*)malloc(dictBufferCapacity);
|
|
976
1030
|
double regressionTolerance = ((double)params.shrinkDictMaxRegression / 100.0) + 1.00;
|
|
977
1031
|
|
|
978
1032
|
if (!largestDictbuffer || !candidateDictBuffer) {
|
|
@@ -1005,9 +1059,8 @@ COVER_dictSelection_t COVER_selectDict(BYTE* customDictContent, size_t dictBuffe
|
|
|
1005
1059
|
}
|
|
1006
1060
|
|
|
1007
1061
|
if (params.shrinkDict == 0) {
|
|
1008
|
-
COVER_dictSelection_t selection = { largestDictbuffer, dictContentSize, totalCompressedSize };
|
|
1009
1062
|
free(candidateDictBuffer);
|
|
1010
|
-
return
|
|
1063
|
+
return setDictSelection(largestDictbuffer, dictContentSize, totalCompressedSize);
|
|
1011
1064
|
}
|
|
1012
1065
|
|
|
1013
1066
|
largestDict = dictContentSize;
|
|
@@ -1039,20 +1092,16 @@ COVER_dictSelection_t COVER_selectDict(BYTE* customDictContent, size_t dictBuffe
|
|
|
1039
1092
|
return COVER_dictSelectionError(totalCompressedSize);
|
|
1040
1093
|
}
|
|
1041
1094
|
|
|
1042
|
-
if (totalCompressedSize <= largestCompressed * regressionTolerance) {
|
|
1043
|
-
COVER_dictSelection_t selection = { candidateDictBuffer, dictContentSize, totalCompressedSize };
|
|
1095
|
+
if ((double)totalCompressedSize <= (double)largestCompressed * regressionTolerance) {
|
|
1044
1096
|
free(largestDictbuffer);
|
|
1045
|
-
return
|
|
1097
|
+
return setDictSelection( candidateDictBuffer, dictContentSize, totalCompressedSize );
|
|
1046
1098
|
}
|
|
1047
1099
|
dictContentSize *= 2;
|
|
1048
1100
|
}
|
|
1049
1101
|
dictContentSize = largestDict;
|
|
1050
1102
|
totalCompressedSize = largestCompressed;
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
free(candidateDictBuffer);
|
|
1054
|
-
return selection;
|
|
1055
|
-
}
|
|
1103
|
+
free(candidateDictBuffer);
|
|
1104
|
+
return setDictSelection( largestDictbuffer, dictContentSize, totalCompressedSize );
|
|
1056
1105
|
}
|
|
1057
1106
|
|
|
1058
1107
|
/**
|
|
@@ -1115,7 +1164,7 @@ _cleanup:
|
|
|
1115
1164
|
free(freqs);
|
|
1116
1165
|
}
|
|
1117
1166
|
|
|
1118
|
-
|
|
1167
|
+
ZDICTLIB_STATIC_API size_t ZDICT_optimizeTrainFromBuffer_cover(
|
|
1119
1168
|
void* dictBuffer, size_t dictBufferCapacity, const void* samplesBuffer,
|
|
1120
1169
|
const size_t* samplesSizes, unsigned nbSamples,
|
|
1121
1170
|
ZDICT_cover_params_t* parameters)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under both the BSD-style license (found in the
|
|
@@ -12,14 +12,8 @@
|
|
|
12
12
|
# define ZDICT_STATIC_LINKING_ONLY
|
|
13
13
|
#endif
|
|
14
14
|
|
|
15
|
-
#include
|
|
16
|
-
#include
|
|
17
|
-
#include <string.h> /* memset */
|
|
18
|
-
#include <time.h> /* clock */
|
|
19
|
-
#include "../common/mem.h" /* read */
|
|
20
|
-
#include "../common/pool.h"
|
|
21
|
-
#include "../common/threading.h"
|
|
22
|
-
#include "../common/zstd_internal.h" /* includes zstd.h */
|
|
15
|
+
#include "../common/threading.h" /* ZSTD_pthread_mutex_t */
|
|
16
|
+
#include "../common/mem.h" /* U32, BYTE */
|
|
23
17
|
#include "../zdict.h"
|
|
24
18
|
|
|
25
19
|
/**
|
|
@@ -27,11 +27,6 @@
|
|
|
27
27
|
#ifndef _DIVSUFSORT_H
|
|
28
28
|
#define _DIVSUFSORT_H 1
|
|
29
29
|
|
|
30
|
-
#ifdef __cplusplus
|
|
31
|
-
extern "C" {
|
|
32
|
-
#endif /* __cplusplus */
|
|
33
|
-
|
|
34
|
-
|
|
35
30
|
/*- Prototypes -*/
|
|
36
31
|
|
|
37
32
|
/**
|
|
@@ -59,9 +54,4 @@ divsufsort(const unsigned char *T, int *SA, int n, int openMP);
|
|
|
59
54
|
int
|
|
60
55
|
divbwt(const unsigned char *T, unsigned char *U, int *A, int n, unsigned char * num_indexes, int * indexes, int openMP);
|
|
61
56
|
|
|
62
|
-
|
|
63
|
-
#ifdef __cplusplus
|
|
64
|
-
} /* extern "C" */
|
|
65
|
-
#endif /* __cplusplus */
|
|
66
|
-
|
|
67
57
|
#endif /* _DIVSUFSORT_H */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under both the BSD-style license (found in the
|
|
@@ -304,7 +304,7 @@ FASTCOVER_computeFrequency(U32* freqs, const FASTCOVER_ctx_t* ctx)
|
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
306
|
* Prepare a context for dictionary building.
|
|
307
|
-
* The context is only dependent on the parameter `d` and can used multiple
|
|
307
|
+
* The context is only dependent on the parameter `d` and can be used multiple
|
|
308
308
|
* times.
|
|
309
309
|
* Returns 0 on success or error code on error.
|
|
310
310
|
* The context must be destroyed with `FASTCOVER_ctx_destroy()`.
|
|
@@ -545,7 +545,7 @@ FASTCOVER_convertToFastCoverParams(ZDICT_cover_params_t coverParams,
|
|
|
545
545
|
}
|
|
546
546
|
|
|
547
547
|
|
|
548
|
-
|
|
548
|
+
ZDICTLIB_STATIC_API size_t
|
|
549
549
|
ZDICT_trainFromBuffer_fastCover(void* dictBuffer, size_t dictBufferCapacity,
|
|
550
550
|
const void* samplesBuffer,
|
|
551
551
|
const size_t* samplesSizes, unsigned nbSamples,
|
|
@@ -614,7 +614,7 @@ ZDICT_trainFromBuffer_fastCover(void* dictBuffer, size_t dictBufferCapacity,
|
|
|
614
614
|
}
|
|
615
615
|
|
|
616
616
|
|
|
617
|
-
|
|
617
|
+
ZDICTLIB_STATIC_API size_t
|
|
618
618
|
ZDICT_optimizeTrainFromBuffer_fastCover(
|
|
619
619
|
void* dictBuffer, size_t dictBufferCapacity,
|
|
620
620
|
const void* samplesBuffer,
|