Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Chapter 4. Record Formats<br />
Compression Types<br />
the original uncompressed data. It is recommended, in cases where the<br />
compressed data becomes larger than (or, in many cases, the same size<br />
as) the uncompressed data, that the data be left uncompressed by the<br />
data preparation program.<br />
0x00000080 0x00000100 0x00000000 Run of 256 words of 0x00000000<br />
0x00000080 0x00000000 Run of 1 word of 0x00000080<br />
0x00000080 0x00000010 0x00000080 Run of 16 words of 0x00000080<br />
Consecutive compressed packets and uncompressed data words in the<br />
compressed data stream represent the original uncompressed data<br />
starting from the top left corner of the image working down each column<br />
of bitmapped data. A compressed packet may continue from the bottom<br />
of one column to the top of the next column. A compressed data packet<br />
cannot be divided among multiple data records (see the CCD record<br />
description later in this chapter). The compressed data for an object<br />
(character or bitmap) represented by a single data word value can be<br />
encoded using a single packet - 0x00000080 n value - where n is the total<br />
number of words in the original uncompressed data. In Figure 4.1, the<br />
data shown could be compressed to the following:<br />
0x00000080 0x00000027 0x00000000 0x00000080 0x00000004<br />
0x0000ffff 0x00000080 0x0000001f 0x00000000 0x00000080<br />
0x00000004 0xffffffff 0x00000080 0x0000001f 0x00000000<br />
0x00000080 0x0000001b 0xffffffff 0x00000080 0x00000008<br />
0x00000000 0x00000080 0x0000001b 0xffffffff 0x00000080<br />
0x00000008 0x00000000 0x00000080 0x00000004 0xffffffff<br />
0x00000080 0x0000001f 0x00000000 0x00000080 0x00000004<br />
0xffff0000 0x00000080 0x0000003e 0x00000000<br />
280 words compressed to 39 words, a 7 to 1 compression ratio (results<br />
not typical for all applications).<br />
Note: Each dot row of the raster must be padded to the right with zero bits to<br />
make an integral number of 32-bit segments before compression. The<br />
width of the bitmap or character pattern being compressed does not have<br />
to be a multiple of 32 bits but the length of the raster dot row does.<br />
Reference Guide 4 - 3