Hi, I am trying to understand the building of Huffman codes from the code lengths. In the Tremor code first I see that the codewords are being generated by the function _make_words() and then sorted. After this I see some magic code and something related to unused entries. Does the code generate code words for unused entries too? Are these unused entry code words used during the decode process? If these are used why do we call them unused entries? Sorry if my queries are silly, but I really need to understand them. Thanks in advance for your help. -- P.Vamsi Mohan Reddy, Hyderabad. Bad leaders are elected by good citizens who do not vote.
Vamsi Mohan Reddy Pulagam wrote:> I am trying to understand the building of Huffman codes from the code > lengths. In the Tremor code first I see that the codewords are being > generated by the function _make_words() and then sorted. > > After this I see some magic code and something related to unused > entries. Does the code generate code words for unused entries too? Are > these unused entry code words used during the decode process? If these > are used why do we call them unused entries?I think the Huffman codes used by Vorbis encoders are essentially a predetermined set, instead of the optimal ones that you usually create by using the statistics of the whole data. Someone correct me if I'm wrong. -- Tuomo ... > It certainly is still a made-up word. Unlike all the English words that are found in nature. -- http://thedailywtf.com/Comments/Brevity_Is_Important.aspx?pg=2