A method of lossless image data compression including the steps of: (a)
receiving an image; (b) forming a residual image by differencing adjacent
samples of the received image; (c) forming multiple bitplanes directly
from the residual image; (d) predicting polarities of data values of the
residual image; (e) determining incorrectly predicted polarities and
storing the incorrectly predicted polarities in a table; (f) encoding
each of the bitplanes and the incorrectly predicted polarities of the
table to form a compressed image, and (g) transmitting both the encoded
bitplanes and the encoded incorrectly predicted polarities of the table.