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:
1 parent
5eed8e7a55
commit
fc8d293460
2 files changed
+6
-5
No files matched your search
@@ -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