Adaptive Huffman coding: Difference between revisions

Content deleted Content added
No edit summary
m Vitter algorithm: Numbered list
Line 29:
For every symbol transmitted on both sides we must execute '''update procedure''':
 
1.# If current symbol is NYT, add two child nodes to NYT node, one will be a new NYT node the other is leaf node for our symbol, increase weight for new leaf node and old NYT, go to step 4, else go to symbol's leaf node.
2.# If this node does not have the highest number in a block swap it with which has the highest number
 
3.# Increase weight for current node
2. If this node does not have the highest number in a block swap it with which has the highest number
4.# If this is not the root node go to parent node, go to step 2, else end.
 
3. Increase weight for current node
 
4. If this is not the root node go to parent node, go to step 2, else end.
 
Note: swapping nodes means swapping weights and corresponding symbols, but not the numbers.