We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
In general, when generating a Huffman code it is a good idea to assign the more frequent chars/words shorter codes (such as say, 11 vs. 01001001). In theory, 4-5 of the more frequent codes could take the same memory/runtime as 1 of the least frequent.
I think Unicode has somewhere around a million characters? Depending how one implements it, a tree with one 1,000,000,000 leaves could have a height of 30-35 (which is quite small in terms of computer time required to traverse).
Tree: Huffman Decoding
You are viewing a single comment's thread. Return to all comments →
In general, when generating a Huffman code it is a good idea to assign the more frequent chars/words shorter codes (such as say, 11 vs. 01001001). In theory, 4-5 of the more frequent codes could take the same memory/runtime as 1 of the least frequent.
I think Unicode has somewhere around a million characters? Depending how one implements it, a tree with one 1,000,000,000 leaves could have a height of 30-35 (which is quite small in terms of computer time required to traverse).