huffman coding implementation