Fleshed out the encode map generator.
Started work on huffman testcase.