Problem on Vitter algorithm



Hi all,

I have some problems understanding Vitter algorithm. Please consider this example:

http://en.wikipedia.org/wiki/Adaptive_Huffman_coding

suppose the new caracter after "abb" would be "a". So I have to do the update procedure:

1. Go to node 253
2. Now I have to consider if this node does not have the highest number in a block and if no swap it with which has the highest number.

But, this block contains nodes 253 and 254, but 254 does not contain a caracter. So how can I swap them? It is correct If I suppose that a block must contains only nodes with a caracter and caracters are only on leaves nodes? So in this case the block would contain only node 253, so I don't need to swap but only increase the counter and go on with the parent?

Thank you all!

.



Relevant Pages

  • Re: Problem on Vitter algorithm
    ... I have some problems understanding Vitter algorithm. ... So how can I swap them? ... must contains only nodes with a caracter and caracters are only on leaves ... My Crypto code ...
    (comp.compression)
  • Re: Problem on Vitter algorithm
    ... the caracter was never seen, or the position on the second array of ... Do you know any implementation that uses arrays? ... block and if no swap it with which has the highest number. ... My Crypto code ...
    (comp.compression)