Chapter 6
Downloadable Graphics
438TC Operator’s Manual - 880050-0100 6-5
6.5.3
Binary Compression Algorithm
The binary data that make up the image file is a run-length compressed version of the
image data described in Section 7.2. Bytes with a value of “0” HEX or “FF” HEX are
followed by another byte indicating the number of times that value is repeated.
For example: Suppose the original (uncompressed) image file has a sequence of bytes like:
(All values are listed in Hexadecimal)
“00 01 02 03 04 00 00 00 00 00 00 FF FD FF FF FF FF FF 00 FF”
The encoded result would like this:
“00 00 01 02 03 04 00 05 FF 00 FD FF 04 00 00 FF 00”
Result interpretation:
00 - the first byte is 00
00 - count of 0 (the previous 00 byte is not repeated or repeated zero times)
01 - a 01 byte
02 - a 02 byte
03 - a 03 byte
04 - a 04 byte
00 - another “00” byte in the file
05 - the “00” byte is repeated 5 times for a total of 6 “00” bytes (00+05=6 “00” bytes)
FF - a “FF” byte
00 - count of 0 (the previous “FF” byte is not repeated or repeated zero times)
FD - a FD byte
FF - another FF byte
04 - the FF byte is repeated 4 times for a total of 5 “FF” bytes (FF+04 = 5 “FF” bytes)
00 - another 00 byte
00 - repeat count = 0
FF - another FF byte
00 - repeat count = 0
The compression scheme is slightly inefficient for single 00 HEX and FF HEX occurrences
by entering two for each of these occurrences but most image bitmaps include large areas
of either blank space (00 HEX) or black space (FF HEX).
If a string of more than 255 “00” HEX or “FF” HEX occurs, the byte-plus-count sequence
may be repeated as often as necessary to incorporate all occurrences of the byte. For
example, a string of 1132 “FF” HEX bytes in sequence may be encoded as:
“FF FF FF FF FF FF FF FF FF 6B”
The first four pairs of “FF” HEX each encode 256 bytes of “FF” HEX (one for the first “FF”
byte and 255 copies) totaling 1024 bytes of “FF” HEX. The next “FF” HEX byte adds
another and the 6B HEX adds 107 additional copies for a total of 1132 FF HEX bytes.
(4 X 256)+1+107 = 1132
6.5.4
Uncompressed FONT to RAM (^D104)
This command allows graphic and/or font images (fonts must be less than 64KB
uncompressed) to be transmitted in ASCII-HEX, thereby allowing all data to pass over 7 or
Summary of Contents for 438TC
Page 2: ......
Page 4: ......
Page 12: ...viii 438TC Operator s Manual 880050 0100...
Page 52: ...Getting Started Chapter 3 3 36 438TC Operator s Manual 880050 0100...
Page 145: ...Downloadable Fonts Chapter 7 7 8 438TC Operator s Manual 880050 0100...
Page 175: ...Bar Codes Chapter 8 8 30 438TC Operator s Manual 880050 0100...
Page 181: ...Code Switching Chapter 9 9 6 438TC Operator s Manual 880050 0100 Figure 9 5 Code Page 850...
Page 185: ...Code Switching Chapter 9 9 10 438TC Operator s Manual 880050 0100 Figure 9 9 Code Page 852...
Page 189: ...Code Switching Chapter 9 9 14 438TC Operator s Manual 880050 0100 Figure 9 13 Code Page 437...
Page 193: ...Code Switching Chapter 9 9 18 438TC Operator s Manual 880050 0100...
Page 213: ...12 10 438TC Operator s Manual 880050 0100...
Page 215: ...13 2 438TC Operator s Manual 880050 0100...
Page 217: ...13 4 438TC Operator s Manual 880050 0100...
Page 235: ...13 22 438TC Operator s Manual 880050 0100...
Page 239: ...13 26 438TC Operator s Manual 880050 0100...
Page 241: ...13 28 438TC Operator s Manual 880050 0100...
Page 242: ......