An apparatus and method for compressing binarized images (90) comprising
receiving a binarized image (70) and generating a first sequence of first
code symbols (80) representing the binarized image wherein at least one
row of the image is represented in run-length encoded format and encoding
a portion of the first sequence of code symbols using a preliminary
encoding scheme, thereby to provide a first portion of a second sequence
of code symbols, and, while encoding, accumulating the frequency of at
least some of the first code symbols thus far encoded (100) and
generating an additional portion of the second sequence using a modified
version of the code scheme such that at least one subsequent code symbol
in the first sequence with a large accumulated frequency is encoded more
compactly in the second portion than at least one subsequent code symbol
in the first sequence with a small accumulated frequency.