Huffman tree is now created given the distribution of a stream.