Support decompression of compressed blocks of size ZSTD_BLOCKSIZE_MAX exactly

This commit is contained in:
Yann Collet
2022-12-22 12:40:27 -08:00
parent f5ea3a196f
commit ea2895cef4
2 changed files with 14 additions and 2 deletions
+4
View File
@@ -2770,6 +2770,10 @@ ZSTD_entropyCompressSeqStore(
if (cSize >= maxCSize) return 0; /* block not compressed */
}
DEBUGLOG(5, "ZSTD_entropyCompressSeqStore() cSize: %zu", cSize);
/* libzstd decoder before > v1.5.4 is not compatible with compressed blocks of size ZSTD_BLOCKSIZE_MAX exactly.
* This restriction is indirectly already fulfilled by respecting ZSTD_minGain() condition above.
*/
assert(cSize < ZSTD_BLOCKSIZE_MAX);
return cSize;
}