Encoding using a huffman tree finished