HP PCL/PJL reference (PCL 5 Color) - Technical Reference Manual
EN Raster Graphics 6-29
The size of a block is limited to 32,767 bytes. (32,767 bytes is the
number of compressed bytes and not the size of the uncompressed
data). To transfer greater than 32,767 bytes, send multiple blocks.
Adaptive compression uses three control bytes at the beginning of
each row within the block. The first of these bytes, the command byte,
identifies the type of compression for the row. The two following bytes
identify the number of bytes or rows involved. The format for adaptive
compression raster rows is shown below:
<command byte><# of bytes/rows - upper byte><# of bytes/rows - lower byte> ...
... <first raster row byte> ... <last raster row byte>
The command byte designates the compression method, empty row,
or row duplication. Command byte values are shown below.
Value Compression Operation
0 – Unencoded
1 – Run-Length Encoding
2 – Tagged Image File Format (TIFF) rev 4.0
3 – Delta row
4 – Empty row
5 – Duplicate row