1
0
mirror of https://github.com/facebook/zstd.git synced 2025-03-06 08:49:28 +02:00

4714 Commits

Author SHA1 Message Date
Yann Collet
f8a2b352d6 clarify doc on Frame-level methods when invoked on a skippable frame
following discussion at #4226
2024-12-29 02:41:09 -08:00
Yann Collet
47cbfc87a9 restore invocation of ZSTD_entropyCompressSeqStore()
in the ZSTD_compressSequences() pipeline
2024-12-20 10:37:01 -08:00
Yann Collet
522adc34eb minor: use MEM_writeLE24()
so that an empty frame needs only 3 bytes of dstCapacity.
2024-12-20 10:37:01 -08:00
Yann Collet
b7a9e69d8d added parameter litCapacity
to ZSTD_compressSequencesAndLiterals()
to enforce the litCapacity >= litSize+8 condition.
2024-12-20 10:37:01 -08:00
Yann Collet
76445bb379 add a check, to return an error if Sequence validation is enabled
since ZSTD_compressSequencesAndLiterals() doesn't support it.
2024-12-20 10:37:01 -08:00
Yann Collet
ab0f1798e8 ensure that srcSize is controlled 2024-12-20 10:37:00 -08:00
Yann Collet
b339efff2b add dedicated error code for special case
ZSTD_compressSequencesAndLiterals() cannot produce an uncompressed block
2024-12-20 10:37:00 -08:00
Yann Collet
0a54f6f288 ZSTD_compressSequencesAndLiterals requires srcSize as parameter
this makes it possible to adjust windowSize to its tightest.
2024-12-20 10:37:00 -08:00
Yann Collet
b7b4e86347 fixed minor conversion warning 2024-12-20 10:37:00 -08:00
Yann Collet
12c47d3262 improved speed of the Sequences converter 2024-12-20 10:37:00 -08:00
Yann Collet
95ad9e47ff added benchmark for ZSTD_convertBlockSequences_wBlockDelim() 2024-12-20 10:37:00 -08:00
Yann Collet
d48e330ae1 change name to ZSTD_convertSequences*() 2024-12-20 10:37:00 -08:00
Yann Collet
31b5ef2539 ZSTD_compressSequencesAndLiterals() now supports multi-blocks frames. 2024-12-20 10:36:59 -08:00
Yann Collet
5164d44dab change advanced parameter name: ZSTD_c_repcodeResolution
and updated its documentation.
Note: older name ZSTD_c_searchForExternalRepcodes remains supported via #define
2024-12-20 10:36:59 -08:00
Yann Collet
ca8bd83373 minor: cleaner function parameter repcodeResolution 2024-12-20 10:36:59 -08:00
Yann Collet
d2d0fdac42 updated documentation on validateSequence 2024-12-20 10:36:59 -08:00
Yann Collet
1f6d6815c3 optimization: instantiate specialized version without Sequence checking code
results in +4% compression speed,
thanks to removal of branches in the hot loop.
2024-12-20 10:36:59 -08:00
Yann Collet
a288751de7 minor optimization: only track seqPos->posInSrc when validateSequences is enabled
note: very minor saving, no performance impact
2024-12-20 10:36:59 -08:00
Yann Collet
f176514467 minor doc update 2024-12-20 10:36:59 -08:00
Yann Collet
1c8f5b0f11 minor optimization for ZSTD_compressSequencesAndLiterals()
does not need to track and update internal `litPtr`.
note: does not measurably impact performance.
2024-12-20 10:36:59 -08:00
Yann Collet
0a5c0807af minor conversion warning fix 2024-12-20 10:36:59 -08:00
Yann Collet
f281497aef fullbench: new scenario: compressSequencesAndLiterals() 2024-12-20 10:36:59 -08:00
Yann Collet
8ab04097ed add the compressSequences() benchmark scenario 2024-12-20 10:36:59 -08:00
Yann Collet
0b013b2688 added unit tests to ZSTD_compressSequencesAndLiterals()
seems to work as expected,
correctly control that `litSize` and `srcSize` are exactly correct.
2024-12-20 10:36:58 -08:00
Yann Collet
14a21e43b3 produced ZSTD_compressSequencesAndLiterals() as a separate pipeline
only supports explicit delimiter mode, at least for the time being
2024-12-20 10:36:58 -08:00
Yann Collet
bcb15091aa minor: more accurate variable scope 2024-12-20 10:36:58 -08:00
Yann Collet
047db4f1f8 ZSTD_SequenceCopier_f no returns the nb of bytes consumed from input
which feels much more natural
2024-12-20 10:36:58 -08:00
Yann Collet
4ef9d7d585 codemod: ZSTD_cParamMode_e -> ZSTD_CParamMode_e 2024-12-20 10:36:58 -08:00
Yann Collet
56cfb7816a codemod: ZSTD_paramSwitch_e -> ZSTD_ParamSwitch_e 2024-12-20 10:36:58 -08:00
Yann Collet
13b9296d79 minor simplification 2024-12-20 10:36:58 -08:00
Yann Collet
e0f3aaee46 doc: add mention of frame checksum incompatibility
for new prototype ZSTD_compressSequencesAndLiterals()
2024-12-20 10:36:57 -08:00
Yann Collet
08edecb78c codemod: ZSTD_blockCompressor -> ZSTD_BlockCompressor_f 2024-12-20 10:36:57 -08:00
Yann Collet
25bef24c5c codemod: rawSeqStore_t -> RawSeqStore_t 2024-12-20 10:36:57 -08:00
Yann Collet
41c667c0fd codemod: repcodes_t -> Repcodes_t 2024-12-20 10:36:57 -08:00
Yann Collet
5df80acedb codemod: ZSTD_matchState_t -> ZSTD_MatchState_t 2024-12-20 10:36:57 -08:00
Yann Collet
fa468944f2 codemod: ZSTD_buildSeqStore_e -> ZSTD_BuildSeqStore_e 2024-12-20 10:36:57 -08:00
Yann Collet
30671d77af codemod: ZSTD_sequencePosition -> ZSTD_SequencePosition 2024-12-20 10:36:57 -08:00
Yann Collet
5359d16d8d enable proper type 2024-12-20 10:36:57 -08:00
Yann Collet
03d95f9d13 fix proper type for .forceNonContiguous 2024-12-20 10:36:57 -08:00
Yann Collet
76dd3a98c4 scope: ZSTD_copySequencesToSeqStore*() are private to ZSTD_compress.c
no need to publish them outside of this unit.
2024-12-20 10:36:57 -08:00
Yann Collet
1ac79ba1b6 minor: simplify ZSTD_selectSequenceCopier 2024-12-20 10:36:56 -08:00
Yann Collet
894ea31281 codemod: ZSTD_sequenceCopier -> ZSTD_SequenceCopier_f 2024-12-20 10:36:56 -08:00
Yann Collet
c97522f7fb codemod: ZSTD_sequenceFormat_e -> ZSTD_SequenceFormat_e
since it's a type name.

Note: in contrast with previous names, this one is on the Public API side.
So there is a #define, so that existing programs using ZSTD_sequenceFormat_e still work.
2024-12-20 10:36:56 -08:00
Yann Collet
0165eeb441 created ZSTD_entropyCompressSeqStore_wExtLitBuffer()
can receive externally defined buffer of literals
2024-12-20 10:36:56 -08:00
Yann Collet
e9f8a119b4 ZSTD_entropyCompressSeqStore_internal() can accept an externally defined literals buffer 2024-12-20 10:36:56 -08:00
Yann Collet
0442e43aca codemod: ZSTD_defaultPolicy_e -> ZSTD_DefaultPolicy_e 2024-12-20 10:36:56 -08:00
Yann Collet
477a01067f codemod: symbolEncodingType_e -> SymbolEncodingType_e 2024-12-20 10:36:56 -08:00
Yann Collet
8d4506bc94 codemod: ZSTD_sequenceLength -> ZSTD_SequenceLength 2024-12-20 10:36:55 -08:00
Yann Collet
a2245721ca codemod: seqStore_t -> SeqStore_t
same idea, SeqStore_t is a type name, it should start with a Capital letter.
2024-12-20 10:36:55 -08:00
Yann Collet
9671813375 codemod: seqDef -> SeqDef
SeqDef is a type name, so it should start with a Capital letter.
It's an internal symbol, no impact on public API.
2024-12-20 10:36:55 -08:00