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
Lake Ronkonkoma, New York

... spread out with 24.7% under the age of 18, 7.4% from 18 to 24, 32.6% from 25 to 44, 23.2% from 45 to 64, and 12.2% who are 65 years of age or older. The median age is 37 ...

 
 
 
This page was created in 31.3 ms