Building a data compression utility in Haskell using Huffman codes
In this post we will implement a data compression program in about 150 lines of Haskell.
It will use Huffman coding and handle arbitrary binary files using constant memory for encoding and decoding.
The plan is:
We briefly cover what Huffman codes are and how they can be used for data compression.
We write a coder capable of compressing text.
In the last step we use this coder to compress any file at all.
We will leverage laziness to keep our memory footprint constant while the code remains modu...
Read more at lazamar.github.io