Huffman Coding implementation