dictionary compression use correct file size estimation
when determining compression parameters to compress one file only. For multiple files, it still "bets" that files are going to be small. There was also a bug recently added in ZSTD_CCtx_loadDictionary_advanced() making it incapable to use pledgedSrcSize to determine compression parameters.
This commit is contained in:
@@ -531,7 +531,7 @@ size_t ZSTD_CCtx_loadDictionary_advanced(
|
||||
cctx->cdict = NULL;
|
||||
} else {
|
||||
ZSTD_compressionParameters const cParams =
|
||||
ZSTD_getCParamsFromCCtxParams(cctx->requestedParams, 0, dictSize);
|
||||
ZSTD_getCParamsFromCCtxParams(cctx->requestedParams, cctx->pledgedSrcSizePlusOne-1, dictSize);
|
||||
cctx->cdictLocal = ZSTD_createCDict_advanced(
|
||||
dict, dictSize,
|
||||
dictLoadMethod, dictMode,
|
||||
|
||||
Reference in New Issue
Block a user