mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
produced ZSTD_compressSequencesAndLiterals() as a separate pipeline
only supports explicit delimiter mode, at least for the time being
This commit is contained in:
@ -1415,14 +1415,18 @@ ZSTD_compressSequences(ZSTD_CCtx* cctx,
|
||||
ZSTD_compressSequencesAndLiterals(ZSTD_CCtx* cctx,
|
||||
void* dst, size_t dstCapacity,
|
||||
const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
|
||||
const void* literals, size_t litSize);
|
||||
const void* literals, size_t litSize, size_t srcSize);
|
||||
</b><p> This is a variant of ZSTD_compressSequences() which,
|
||||
instead of receiving (src,srcSize) as input parameter, receives (literals,litSize),
|
||||
aka all literals already extracted and laid out into a single continuous buffer.
|
||||
This can be useful if the process generating the sequences also happens to generate the buffer of literals,
|
||||
thus skipping an extraction + caching stage.
|
||||
To be valid, @litSize must be equal to the sum of all @.litLength fields in @inSeqs.
|
||||
Important: Employing this prototype is incompatible with frame checksum.
|
||||
It's essentially a speed optimization when the right conditions are met,
|
||||
but it also includes so following limitations:
|
||||
- Only supports explicit delimiter mode
|
||||
- Not compatible with frame checksum, which must disabled
|
||||
- Can fail when unable to compress sufficiently
|
||||
Also, to be valid, @litSize must be equal to the sum of all @.litLength fields in @inSeqs.
|
||||
@return : final compressed size, or a ZSTD error code.
|
||||
|
||||
</p></pre><BR>
|
||||
|
Reference in New Issue
Block a user