Browse Prior Art Database

Simple Raster Character Compression Technique

IP.com Disclosure Number: IPCOM000119224D
Original Publication Date: 1991-Jan-01
Included in the Prior Art Database: 2005-Apr-01
Document File: 4 page(s) / 131K

Publishing Venue

IBM

Related People

Damon, BW: AUTHOR [+2]

Abstract

Storing large numbers of characters in an uncompressed format in a low end printer is raster form takes a large storage amount. Disclosed is a compression technique that yields limited compression but at a small processing penalty that allows the printer to process compressed data nearly as fast as processing the uncompressed data.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 46% of the total text.

Simple Raster Character Compression Technique

      Storing large numbers of characters in an uncompressed
format in a low end printer is raster form takes a large storage
amount.  Disclosed is a compression technique that yields limited
compression but at a small processing penalty that allows the printer
to process compressed data nearly as fast as processing the
uncompressed data.

      The IBM 4019 printer stores characters in a form known as
"bounded box" form.  The character is represented in the font by the
smallest rectangular area that encloses all of the pels that are
"black" and information on how to place the rectangle.  In addition,
the raster image is stored in 16 or 8 bit vertical swathes.

      The character shown in the figure would be encoded as follows:
xdelta ydelta incr width height      x'02ED141213' data
x'FFFFFFFFC1C1C1C1C1C1C1C1C1C1C1C101C001C001C001C001C001C001C001
C001C03FFE3FFE' x'80808080808080800000000000000000000000'

      If a single 8-bit value (chosen because it seldom appears in
real images) is used to indicate that the next byte represents a
replication value for the following word, the image may be expressed
in a smaller number of bytes. Assume the following rules to
"compress" the above image.

      For 16-bit columns
1.   Use x'10' to indicate that a replication count follows:
x'1004AABB' would then be replaced by x'AABBAABBAABBAABBAABB'.
2.   If the data bytes x'10' occurs as the first byte of a 16-bit
word in the data, it is replaced by x'10ctdata' where x'ct' is one
less than the number of times the x'data' is repeated.
3.   Only replace other strings if they occur 3 or more times in
succession.
4.   If a word is replicated more than 256 times in succession,
replace with x'10FFdata', where x'data' is the word being replicated.
Then, restart the compression.

      For 8-bit columns
1.   Use x'10' to indicate that a replication count follows:
x'1004AA' would then be replaced by x'AAAAAAAAAA'.
2.   If the data byte x'10' occurs as the first byte of an 8-bit word
in the data, it is replaced by x'10ctdt' where x'ct' is one less than
the number of times the x'dt' byte is repeated.
3.   Only replace other strings if they occur 4 or more times in
succession.
4.   If a word is replicated more than 256 times in succession
replace with x'10FFdt, where x'dt' is the byte being replicated.
Then, restart the compression.
The resulting data requires only 27 bytes of data to describe instead
of 62. data x'02ED141213FFFFFFFF1005C1C1100801C03FFE3FFE'     saves
22 x'100780100A00' 13

      The code required to encode the character with this scheme is
fairly trivial (See Pseudo Listing 1).  The code required to decode
the character with this scheme is also trivial (See Pseudo Listing
2).  Even though the compression savings is not as large as may be
obtained with other compression schemes such as MMR or RL4, the
simplicity of this algorithm's encoding and dec...