Adaptive Huffman coding: Difference between revisions

Content deleted Content added
No edit summary
Line 88:
Step 3:
 
NYT spawns two child nodes: 252 for NYT and 253 for leaf node, both with weight 0. Increase weights for 253, 254, and root. To maintain Vitter’s invariant that all leaves of weight w precede (in the implicit numbering) all internal nodes of weight w, the branch starting with node 254 should be swopswapped (in terms of symbols and weights, but not number ordering) with node 255. Code for "b" is 11.
 
For the second "b" transmit 11.