Encyclopedia > PackBits

  Article Content

PackBits

Apple introduced the PackBits format for run-length encoding of data with the release of MacPaint on the Macintosh computer. This compression scheme is one of the types of compression that can be used in TIFF-files.

A PackBits data stream consists of packets of one byte of header followed by data. The header is a signed byte; the data can be signed, unsigned, or packed (such as MacPaint pixels).

Header byteData
0 to 1271 + n literal bytes of data
0 to -127One byte of data, repeated 1 - n times in the decompressed output
-128No operation
Note that interpreting 0 as positive or negative makes no difference in the output. Runs of two bytes adjacent to non-runs are typically written as literal data.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Northampton, Suffolk County, New York

... from 25 to 44, 20.9% from 45 to 64, and 9.8% who are 65 years of age or older. The median age is 34 years. For every 100 females there are 91.0 males. For every 100 ...

 
 
 
This page was created in 36.4 ms