Update name of enum, clarify documentation
This commit is contained in:
parent
9102f30dbf
commit
d4d0346b40
@ -2505,6 +2505,7 @@ static void ZSTD_copyBlockSequences(ZSTD_CCtx* zc)
|
|||||||
for (i = 0; i < seqStoreSeqSize; ++i) {
|
for (i = 0; i < seqStoreSeqSize; ++i) {
|
||||||
outSeqs[i].litLength = seqStoreSeqs[i].litLength;
|
outSeqs[i].litLength = seqStoreSeqs[i].litLength;
|
||||||
outSeqs[i].matchLength = seqStoreSeqs[i].matchLength + MINMATCH;
|
outSeqs[i].matchLength = seqStoreSeqs[i].matchLength + MINMATCH;
|
||||||
|
outSeqs[i].rep = 0;
|
||||||
|
|
||||||
if (i == seqStore->longLengthPos) {
|
if (i == seqStore->longLengthPos) {
|
||||||
if (seqStore->longLengthID == 1) {
|
if (seqStore->longLengthID == 1) {
|
||||||
|
@ -1298,16 +1298,16 @@ ZSTDLIB_API unsigned long long ZSTD_decompressBound(const void* src, size_t srcS
|
|||||||
ZSTDLIB_API size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize);
|
ZSTDLIB_API size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ZSTD_sf_blockDelimiters = 0,
|
ZSTD_sf_explicitBlockDelimiters = 0, /* Representation of ZSTD_Sequence contains explicit block delimiters */
|
||||||
ZSTD_sf_noBlockDelimiters = 1,
|
ZSTD_sf_noBlockDelimiters = 1, /* Representation of ZSTD_Sequence has no block delimiters, sequences only */
|
||||||
} ZSTD_sequenceFormat_e;
|
} ZSTD_sequenceFormat_e;
|
||||||
|
|
||||||
/*! ZSTD_getSequences() :
|
/*! ZSTD_getSequences() :
|
||||||
* Extract sequences from the sequence store.
|
* Extract sequences from the sequence store.
|
||||||
* If invoked with ZSTD_sf_blockDelimiters, block will end with a dummy sequence
|
* If invoked with ZSTD_sf_explicitBlockDelimiters, each block will end with a dummy sequence
|
||||||
* with offset == 0, matchLength == 0, and litLength == length of last literals.
|
* with offset == 0, matchLength == 0, and litLength == length of last literals.
|
||||||
*
|
*
|
||||||
* If invoked with ZSTD_sf_noBlockDelimiters, sequences will still be generated
|
* If invoked with ZSTD_sf_noBlockDelimiters, sequences will still be internally generated
|
||||||
* on a per-block basis, but any last literals of a block will be merged into the
|
* on a per-block basis, but any last literals of a block will be merged into the
|
||||||
* last literals of the first sequence in the next block.
|
* last literals of the first sequence in the next block.
|
||||||
* As such, the final generated result has no explicit representation of block boundaries,
|
* As such, the final generated result has no explicit representation of block boundaries,
|
||||||
|
@ -2725,8 +2725,8 @@ static int basicUnitTests(U32 const seed, double compressibility)
|
|||||||
RDG_genBuffer(CNBuffer, srcSize, 0.03, 0., seed);
|
RDG_genBuffer(CNBuffer, srcSize, 0.03, 0., seed);
|
||||||
|
|
||||||
/* Test with block delimiters roundtrip */
|
/* Test with block delimiters roundtrip */
|
||||||
seqsSize = ZSTD_getSequences(cctx, seqs, srcSize, src, srcSize, ZSTD_sf_blockDelimiters);
|
seqsSize = ZSTD_getSequences(cctx, seqs, srcSize, src, srcSize, ZSTD_sf_explicitBlockDelimiters);
|
||||||
FUZ_decodeSequences(decoded, seqs, seqsSize, src, srcSize, ZSTD_sf_blockDelimiters);
|
FUZ_decodeSequences(decoded, seqs, seqsSize, src, srcSize, ZSTD_sf_explicitBlockDelimiters);
|
||||||
assert(!memcmp(CNBuffer, compressedBuffer, srcSize));
|
assert(!memcmp(CNBuffer, compressedBuffer, srcSize));
|
||||||
|
|
||||||
/* Test no block delimiters roundtrip */
|
/* Test no block delimiters roundtrip */
|
||||||
|
Loading…
Reference in New Issue
Block a user