Arrangements and procedures for compressing grayscale, binary and bi-level
image data are disclosed. With respect to compressing binary and bi-level
image data, individual byte image data values are retained that are
different from a same row byte that is n-bytes back. For each retained
byte image data value, individual byte image data values are encoded for
bytes in a current byte row with replacement data strings. The
replacement data strings include a replacement positioning code and a
replacement count code for replicating retained byte image data values
for subsequent data decompression as a group of substantially identical
byte values.