[libzstd] Set CLEVEL_CUSTOM correctly
In `ZSTD_compressBegin_advanced()`, `ZSTD_parameters` are used to set the compression parameters, but the level didn't get set to `CLEVEL_CUSTOM`, so `ZSTD_compressBlock()` used the wrong parameters when checking the source size.
This commit is contained in:
@@ -240,6 +240,7 @@ static ZSTD_CCtx_params ZSTD_assignParamsToCCtxParams(
|
|||||||
ZSTD_CCtx_params ret = cctxParams;
|
ZSTD_CCtx_params ret = cctxParams;
|
||||||
ret.cParams = params.cParams;
|
ret.cParams = params.cParams;
|
||||||
ret.fParams = params.fParams;
|
ret.fParams = params.fParams;
|
||||||
|
ret.compressionLevel = ZSTD_CLEVEL_CUSTOM;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user