Basic huffman encoding seems to be working.