lz4 icon indicating copy to clipboard operation
lz4 copied to clipboard

Dictionary support in compression

Open heikkisalokantosc opened this issue 2 years ago • 1 comments

Request to add CompressBlockWithDict(src, dst, dict []byte).

Decompression with dictionary seems to be already supported by UncompressBlockWithDict(src, dst, dict []byte).

It could also use some documentation regarding the format of the dictionary and how to generate it. Probably this still applies:

lz4 doesn't specify how to build a dictionary. All it says is that it can be any file up to 64 KB. This approach is compatible with zstd dictionary builder, which can be instructed to create a 64 KB dictionary with this command: zstd --train dirSamples/* -o dictName --maxdict=64KB

heikkisalokantosc avatar Mar 17 '23 10:03 heikkisalokantosc

Happy to add it, open to PR.

pierrec avatar Jan 08 '24 13:01 pierrec