add a check, to return an error if Sequence validation is enabled

since ZSTD_compressSequencesAndLiterals() doesn't support it.
This commit is contained in:
Yann Collet
2024-12-20 10:37:01 -08:00
parent 52a9bc6fca
commit 76445bb379
3 changed files with 7 additions and 2 deletions
+3
View File
@@ -7319,6 +7319,9 @@ ZSTD_compressSequencesAndLiterals(ZSTD_CCtx* cctx,
if (cctx->appliedParams.blockDelimiters == ZSTD_sf_noBlockDelimiters) {
RETURN_ERROR(frameParameter_unsupported, "This mode is only compatible with explicit delimiters");
}
if (cctx->appliedParams.validateSequences) {
RETURN_ERROR(parameter_unsupported, "This mode is not compatible with Sequence validation");
}
if (cctx->appliedParams.fParams.checksumFlag) {
RETURN_ERROR(frameParameter_unsupported, "this mode is not compatible with frame checksum");
}