zstd icon indicating copy to clipboard operation
zstd copied to clipboard

Question about dictionary reload conditions

Open ghost opened this issue 2 years ago • 3 comments

The dictionary reload conditions are:

https://github.com/facebook/zstd/blob/9b4833df2de3ab1779474c08725e398ea96127a1/lib/compress/zstd_compress.c#L5012-L5020

Should cdict->compressionLevel == 0 be cdict->compressionLevel != 0?

If a dictionary is from ZSTD_CCtx_loadDictionary(), cdict->compressionLevel is 0. If a dictionary is from ZSTD_CCtx_refCDict(), cdict->compressionLevel is not 0.

ghost avatar Apr 02 '23 02:04 ghost