kapenga / LittleBit

LittleBit is a pure Huffman coding compression algorithm with the option of random access reading while offering competitive compression ratios.
12 stars 1 forks source link

multiple huffman tree #5

Open da0ka opened 3 years ago

da0ka commented 3 years ago

How about use 2 huffman trees? One used for dictionary, and for packed data. Of course, it hurts speed.

kapenga commented 3 years ago

I don't think it would help compression. Storing a tree gives probably more overhead than gaining on the nodes. I however made some uncommitted changes to the tree generation to avoid leaves that are only used for the tree itself. The result is that the tree is slightly smaller and compression itself improves too. In the future I will commit these changes to github.