setParameter : no side-effect on setting a compression parameter
last such side-effect was modifying cctx->loadedDictEnd on setting forceWindow. It is no a useless operation, so it's removed. No side-effect left when setting a compression parameter.
This commit is contained in:
@@ -359,7 +359,7 @@ void ZSTDMT_compressChunk(void* jobDescription)
|
||||
assert(job->firstChunk); /* should only happen for first segment */
|
||||
if (ZSTD_isError(initError)) { job->cSize = initError; goto _endJob; }
|
||||
} else { /* srcStart points at reloaded section */
|
||||
ZSTD_CCtx_params jobParams = job->params;
|
||||
ZSTD_CCtx_params jobParams = job->params; /* do not modify job->params ! copy it, modify the copy */
|
||||
size_t const forceWindowError = ZSTD_CCtxParam_setParameter(&jobParams, ZSTD_p_forceMaxWindow, !job->firstChunk);
|
||||
U64 const pledgedSrcSize = job->firstChunk ? job->fullFrameSize : ZSTD_CONTENTSIZE_UNKNOWN;
|
||||
/* load dictionary in "content-only" mode (no header analysis) */
|
||||
|
||||
Reference in New Issue
Block a user