The predictor is implemented as a lookup table which converts the signs of pel differences around the predictor square into shape indices. These are interpreted to form shape-based predictions as described earlier. In the evaluation code, the statistics are not updated for every input sample. Rather, only every fourth sample is added to the symbols counts. The reason for this is that updating the Huffman tree is relatively time consuming, and there is little compression cost in only taking every fourth sample.
Data modeling in the encoder takes place in three phases.
First, starting from the coarsest subsampled band, L8, the encoder generates the prediction difference pyramid from H8 to H1. Next, beginning at the finest difference band, H8, it propagates zeros backwards through the binary tree to place the leaf codewords. Finally it DPCM-codes L8, then writes it, followed by H8 to H1, via the entropy coders, to the compressed file. The decompression of binary tree coded images requires only one pass. Following entropy decoding, the coarsest band is first recovered and written immediately to the appropriate pels in the output image.