9400 Series Programmer's Manual
Compressing the Data Stream
Image data usually consists of a large amount of repetitive data. Therefore, the printer uses a data compression algorithm for the graphic message structure. Here's how it works.
1.Any image is defined as a matrix of cells.
2.Each row of the matrix consists of a series of consecutive ON (black) or OFF (white) cells. The range is
Example: 39 consecutive white cells would be represented by the letters `zm' (i.e. `z' produces 26 white cells followed by `m' or 13 more white cells).
3.Each row of the matrix is terminated by the command
4.In addition to compressing consecutive cells, repetitive lines of compressed row data can be combined. For example, if twelve rows have the same data (;zm), a number can be added at the beginning of the line to repeat the line (;12zm).
The following example shows how you can compress the "Letter A" data stream. The long version is on the left. The compressed version of the same data stream is on the right.