mirror of
https://github.com/facebook/zstd.git
synced 2025-07-14 03:04:20 +02:00
conservatively estimate over-splitting in presence of incompressible loss
ensure data can never be expanded by more than 3 bytes per full block.
This commit is contained in:
@ -4587,6 +4587,7 @@ static size_t ZSTD_compress_frameChunk(ZSTD_CCtx* cctx,
|
||||
} /* if (ZSTD_useTargetCBlockSize(&cctx->appliedParams))*/
|
||||
|
||||
if (cSize < blockSize) savings += (blockSize - cSize);
|
||||
else if (savings) savings--;
|
||||
ip += blockSize;
|
||||
assert(remaining >= blockSize);
|
||||
remaining -= blockSize;
|
||||
|
Reference in New Issue
Block a user