huffman using js