converts a text to huffman code