Simple huffman coding and encoding function in Python with TDD.