huffman encode and decode