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
Dennis Gabor

...     Contents Dennis Gabor Dennis Gabor (Gábor Dénes) (1900-1979) was a Hungarian physicist. He invented holography in 1947, for ...

 
 
 
This page was created in 29.2 ms