lz4
lz4 copied to clipboard
Dictionary support in compression
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
Happy to add it, open to PR.