Assert `ctx` and `ms` cparams Equivalency
parent
4e3ecee9ed
commit
03103269de
|
@ -2356,6 +2356,9 @@ static size_t ZSTD_compressBlock_internal(ZSTD_CCtx* zc,
|
||||||
dstCapacity, ms->window.dictLimit, ms->nextToUpdate);
|
dstCapacity, ms->window.dictLimit, ms->nextToUpdate);
|
||||||
assert(srcSize <= ZSTD_BLOCKSIZE_MAX);
|
assert(srcSize <= ZSTD_BLOCKSIZE_MAX);
|
||||||
|
|
||||||
|
/* Assert that we have correctly flushed the ctx params into the ms's copy */
|
||||||
|
assert(ZSTD_equivalentCParams(zc->appliedParams.cParams, ms->cParams));
|
||||||
|
|
||||||
if (srcSize < MIN_CBLOCK_SIZE+ZSTD_blockHeaderSize+1) {
|
if (srcSize < MIN_CBLOCK_SIZE+ZSTD_blockHeaderSize+1) {
|
||||||
ZSTD_ldm_skipSequences(&zc->externSeqStore, srcSize, zc->appliedParams.cParams.searchLength);
|
ZSTD_ldm_skipSequences(&zc->externSeqStore, srcSize, zc->appliedParams.cParams.searchLength);
|
||||||
return 0; /* don't even attempt compression below a certain srcSize */
|
return 0; /* don't even attempt compression below a certain srcSize */
|
||||||
|
|
Loading…
Reference in New Issue