Adaptive Huffman coding: Difference between revisions

Content deleted Content added
Gnomz007 (talk | contribs)
Line 46:
Start with empty tree.
 
For '''"a"''' transmit it'sits binary code.
 
NYT spawns two child nodes 254 and 255.
Line 54:
 
 
For '''"b"''' transmit 0 for NYT node, then it'sits binary code.
NYT spawns two child nodes 252 for NYT and 253 for leaf node.
Increase weights for 253 and 254 and root.
Line 60:
 
For second '''"b"''' transmit 01.
Go to it'sits leaf node 253, we have a block of wightsweights of 1 and the biggest number in the block is 255, so swap the nodes, increase weghtweight, go to root, increase weigthweight for root.
 
Future code for '''"b"''' is 1, and for '''"a"''' is now 01, which reflects their frequency.
 
<!-- Edited 2004-11-10:
s/it's/its/ (correct spelling of possessive)-->
 
== External links ==