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
Ocean Beach, New York

... As of the census of 2000, there are 138 people, 61 households, and 35 families residing in the village. The population density is 380.6/km² (967.1/mi²). ...

 
 
 
This page was created in 33.5 ms