added huffman encoding [unfinished].