An image data compression technique includes division of an image data
stream into a plurality of subregions and optimal compression of each
subregion. The subregions may represent adjacent pixels in a reconstructed
image, and may all be of the same length. The length of the subregions may
be set to a default, and may be altered based upon image characteristics.
The subregions are analyzed for selection of an optimal compression
algorithm for each subregion from a set of candidate algorithms. Criteria
for selection of the optimal algorithms may include the relative entropy
levels of data within the subregions, and the length of compressed data
code resulting from application of each of the candidate algorithms.