binjs-ref
binjs-ref copied to clipboard
Context 0.1: Huffman tables
This is a first step towards decompressing Huffman content.
I think it LGTM. I'm wondering if you couldn't use an existing implementation on crates.io? Looking at the results https://crates.io/search?q=huffman, they doesn't seem commonly used tho.
I've looked at a few crates and they all seemed to use actual trees to represent Huffman codes, which makes them very slow for our use case.
Happy to review... could you look at the failing test first?
I've reworked the MultiLookupHuffmanTable
to remove some assumptions on the prefix bit length.