mirror of
https://github.com/facebook/zstd.git
synced 2025-03-06 16:56:49 +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:
parent
5ae34e4c96
commit
ea85dc7af6
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user