Modify params rather than cctx->requestedParams
This commit is contained in:
parent
64bd68e44b
commit
801513b5e7
@ -3993,11 +3993,10 @@ size_t ZSTD_compressStream2( ZSTD_CCtx* cctx,
|
|||||||
ZSTD_memset(&cctx->prefixDict, 0, sizeof(cctx->prefixDict)); /* single usage */
|
ZSTD_memset(&cctx->prefixDict, 0, sizeof(cctx->prefixDict)); /* single usage */
|
||||||
assert(prefixDict.dict==NULL || cctx->cdict==NULL); /* only one can be set */
|
assert(prefixDict.dict==NULL || cctx->cdict==NULL); /* only one can be set */
|
||||||
if (cctx->cdict)
|
if (cctx->cdict)
|
||||||
cctx->requestedParams.compressionLevel = cctx->cdict->compressionLevel; /* let cdict take priority in terms of compression level */
|
params.compressionLevel = cctx->cdict->compressionLevel; /* let cdict take priority in terms of compression level */
|
||||||
DEBUGLOG(4, "ZSTD_compressStream2 : transparent init stage");
|
DEBUGLOG(4, "ZSTD_compressStream2 : transparent init stage");
|
||||||
if (endOp == ZSTD_e_end) cctx->pledgedSrcSizePlusOne = input->size + 1; /* auto-fix pledgedSrcSize */
|
if (endOp == ZSTD_e_end) cctx->pledgedSrcSizePlusOne = input->size + 1; /* auto-fix pledgedSrcSize */
|
||||||
params.cParams = ZSTD_getCParamsFromCCtxParams(
|
params.cParams = ZSTD_getCParamsFromCCtxParams(¶ms, cctx->pledgedSrcSizePlusOne-1, 0 /*dictSize*/);
|
||||||
&cctx->requestedParams, cctx->pledgedSrcSizePlusOne-1, 0 /*dictSize*/);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef ZSTD_MULTITHREAD
|
#ifdef ZSTD_MULTITHREAD
|
||||||
|
Loading…
x
Reference in New Issue
Block a user