]> git.ipfire.org Git - thirdparty/zstd.git/commit
Set repcodes for empty ZSTD_CDict 997/head
authorNick Terrell <terrelln@fb.com>
Thu, 18 Jan 2018 21:28:30 +0000 (13:28 -0800)
committerNick Terrell <terrelln@fb.com>
Thu, 18 Jan 2018 21:28:30 +0000 (13:28 -0800)
commit9d96761520e75d9902bc94cf319e8c18d4ce9e1a
treed04eddcd09536121ad4d92a7d77b92c4c6c751de
parent592ce5a0420869b0c155f3dd4e450cc659216050
Set repcodes for empty ZSTD_CDict

When the dictionary is <= 8 bytes, no data is loaded from the dictionary.
In this case the repcodes weren't set, because they were inserted after the
size check. Fix this problem in general by first setting the cdict state to
a clean state of an empty dictionary, then filling the state from there.
lib/compress/zstd_compress.c