HP (Hewlett-Packard) PCL 5 Printer User Manual


 
Examples: Run-length and TIFF Compression
The following examples show how a raster row can be coded
using run-length and TIFF compression methods. Note that
the compression examples use characters to represent the
binary data stream.
Byte Number #1 #2 #3 #4 #5 #6 #7
Bits 01010101 01010101 01010101 01010101 01000001 01010100 01010100
ASCIIUUUUATT
Unencoded
?*r1A
?*b0m7WUUUUATT
?*rC
Run-length Encoding
?*r1A
?*b1m6W(3)U(0)A(1)T
?*rC
TIFF Encoding
?*r1A
?*b2m6W(-3)U(0)A(-1)T or ?*b2m6W(-3)U(2)ATT
?*rC
In the TIFF encoding example above, parenthetical
expressions are used to identify control bytes. For example,
the byte (-3) is shown to represent the control byte for a
repetition (minus value) of 3. The actual value for this
position is the decimal value 253. Additional “encoded”
control bytes in this sequence include: (0) for decimal 0, (-1)
for decimal 255, and (2) for decimal 2. The raster data
(pattern) bytes are represented by the ASCII character.
6-24 Raster Graphics6-24 Raster Graphics