tract of zeroes even in low frequency groups the quantization operation may also generate swarms of zeroes because the afterward bit plane coding process is iterative these zeroes would be repeatedly encoded into the output bit stream this undoubtedly will cause severe loss of compression performance one method disclosed in the present invention may help to exclude as many as possible zero coefficients from the bit plane coding process and hence significantly improve both compression and computation performance after quantization each group of dct coefficients including those further decomposed by wavelet transform is partitioned into squares then test each square and identify it as either all zero or not all zero a square is all zero if all coefficients in it are zero otherwise it is not all zero a value map is the data structure which signifies the all zero or not all zero status for the squares in all frequency groups encode the value map by binary arithmetic coder the scan pattern inside the value map may either be linear zigzag across all groups or in the pattern of quadtree coding the afterward bit plane coding process only occurs to not all zero squares therefore zero coefficients located in all zero squares are excluded from the afterward iterative costly bit plane coding the quaternary reaching pattern is similar to the quadtree coding in the bit plane coding process however it only occurs to the not all zero squares at each bit plane from the.