|
|
|
|
|
by lifthrasiir
1007 days ago
|
|
> it's not very clear how the codes are constructed I agree the specification really lacks examples, but it explicitly states that it uses canonical Huffman trees so that only code lengths have to be transmitted. I think this is clear enough to pinpoint the actual tree. (I don't think there is any canonical Huffman tree implementation that uses the inverse lexicographical order.) > This is a decades-old technology that should've had the bugs worked out of its many implementations by now and there are also countless articles about how to implement it. Because there are many implementations of Huffman trees with different trade-offs? Charles Bloom once said that the definitive 1997 paper on Huffman optimizations [1] is still not well known at that point (2010) and many optimizations were rediscovered and then forgotten, so there should be many inefficient implementations out there. [1] https://cbloomrants.blogspot.com/2010/08/08-12-10-lost-huffm... |
|