rust-lz-fear icon indicating copy to clipboard operation
rust-lz-fear copied to clipboard

Dictionary output doesn't match

Open main-- opened this issue 4 years ago • 0 comments

Right now it looks like the output from dictionary mode works, but never matches the C implementation. The most important reason is that the C implementation maintains two distinct hashtables (one for the dictionary, one for the encoded input) whereas this implementation currently simply initializes the encoder hashtable with the dictionary.

Using two tables obviously gives better compression ratios. It's not clear to me however whether this is actually worth it. Perhaps it makes sense to give up on the goal of byte-perfect output when a dictionary is involved.

main-- avatar May 21 '20 09:05 main--