Added huffman encoder