add dedicated error code for special case

ZSTD_compressSequencesAndLiterals() cannot produce an uncompressed block
This commit is contained in:
Yann Collet
2024-12-20 10:37:00 -08:00
parent a80f55f47d
commit b339efff2b
4 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -7254,7 +7254,7 @@ ZSTD_compressSequencesAndLiterals_internal(ZSTD_CCtx* cctx,
* but it's complex, and memory hungry, killing the purpose of this variant.
* Current outcome: generate an error code.
*/
RETURN_ERROR(dstSize_tooSmall, "Data is not compressible"); /* note: error code could be clearer */
RETURN_ERROR(cannotProduce_uncompressedBlock, "ZSTD_compressSequencesAndLiterals cannot generate an uncompressed block");
} else {
U32 cBlockHeader;
assert(compressedSeqsSize > 1); /* no RLE */