PackBits

PackBits (or Apple Macintosh PackBits, or Macintosh RLE) is a form of run-length encoding often used to compress image data.

It is byte-oriented (as opposed to pixel-oriented), so depending on how the image data is organized, it may be ineffective for images that use more than one byte per pixel.

Format
The compressed data stream consists of a code byte, followed by zero or more data bytes, followed by another code byte, and so on.

For whatever reason, PackBits is usually described in terms of signed bytes, which leads to the equivalent definition:

The reserved code byte (128 or −128) should be ignored, unless a format specification says otherwise. A few formats use it to mark the end of the compressed data.

Related formats
Formats that may use PackBits compression include MacPaint, PICT, TIFF, ILBM, and DEGAS.

Specifications

 * TIFF 6.0 Specification, Section 9: PackBits Compression
 * Technical Note TN1023: Understanding PackBits

Resources

 * Wikipedia article