Huffman encoding/decoding; still have to work out some bugs.