[Haskell-cafe] Huffman Codes in Haskell

John Meacham john at repetae.net
Tue Jun 22 15:31:11 EDT 2010

On Tue, Jun 22, 2010 at 06:24:22PM +0100, Andrew Coppin wrote:
> John Meacham wrote:
>> In particular, a Huffman coding:
>> http://en.wikipedia.org/wiki/Huffman_coding
>> is ideal for this (assuming you just are taking advantage of frequency
>> analysis). A dynamic Huffman Tree will even adapt as it is being used to
>> whatever the current language is. Huffman Trees are easy and fun to
>> implement too.
> Interestingly, Huffman coding is one of those problems with a trivially  
> simple mathematical expression, which none the less turns out to be  
> difficult to express succinctly in Haskell. Oh, you can *do* it. It just  
> seems to take a surprising amount of typing...

Hmmm.... Do I hear a challenge? :)

Actually, I can't find my huffman code at the moment, I would be
curious what others take on the problem was.


John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/

More information about the Haskell-Cafe mailing list