Adaptive Huffman coding: Difference between revisions

Content deleted Content added
Line 30:
 
# 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.
# If this node does not have the highest number in a block swap it with which has the highest number and is notbesides this node's parent.
# Increase weight for current node
# If this is not the root node go to parent node, go to step 2, else end.