PackBits

PackBits

PackBits is a fast, simple lossless compression scheme for run-length encoding of data.

Apple introduced the PackBits format 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, TGA-files also use this RLE compression scheme, but treats data stream as pixels instead of bytes.

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

In the following table, "n" is the value of the header byte as a signed integer.

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. It should also be noted that there is no way based on the PackBits data to determine the end of the data stream; that is to say, one must already know the size of the compressed or uncompressed data before reading a PackBits data stream to know where it ends.

External links

* [http://developer.apple.com/technotes/tn/tn1023.html Apple webpage describing the PackBits format]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Tagged Image File Format — TIF and TIFF redirect here. For other uses, see TIF (disambiguation) and TIFF (disambiguation). Tagged Image File Format Filename extension .tiff, .tif Internet media type image/tiff, image/tiff fx Type code TIFF Unifo …   Wikipedia

  • Indexed color — A 2 bit indexed color image. The color of each pixel is represented by a number; each number (the index) corresponds to a color in the color table (the palette). In computing, indexed color is a technique to manage digital images colors in a… …   Wikipedia

  • Run-length encoding — (RLE) is a very simple form of data compression in which runs of data (that is, sequences in which the same data value occurs in many consecutive data elements) are stored as a single data value and count, rather than as the original run. This is …   Wikipedia

  • Truevision TGA — Infobox file format name = Truevision TGA icon = extension = .tga .tpic mime = image/x targa image/x tga type code = TPIC uniform type = com.truevision.tga image owner = Truevision genre = Raster image file container for = contained by = extended …   Wikipedia

  • Bilddateiformat — Ein Grafikformat ist ein Dateiformat, das den Aufbau einer Bilddatei beschreibt. Es gibt zahlreiche Grafikformate, von denen sich nur wenige im großen Maßstab durchsetzen konnten. Viele Grafikformate werden nur von wenigen Anwendungen unterstützt …   Deutsch Wikipedia

  • Grafikformat — Ein Grafikformat ist ein Dateiformat, das den Aufbau einer Bilddatei beschreibt. Es gibt zahlreiche Grafikformate, von denen sich nur wenige im großen Maßstab durchsetzen konnten. Viele Grafikformate werden nur von wenigen Anwendungen unterstützt …   Deutsch Wikipedia

  • Mixed Raster Content — (MRC) beschreibt eine Technik zur Darstellung der Seiteninhalte eines Raster basierten elektronischen Dokuments (eingescannte Seiten oder künstlich erzeugte Seitenbilder) zum Zwecke der Bildkompression. Dabei wird der Seiteninhalt durch eine… …   Deutsch Wikipedia

  • Format TIFF — Tagged Image File Format Pour les articles homonymes, voir TIFF. Le Tag(ged) Image File Format généralement abrégé TIFF est un format de fichier pour image numérique. Adobe en est le dépositaire et le propriétaire initial (via Aldus). Sommaire 1… …   Wikipédia en Français

  • TIF — Tagged Image File Format Pour les articles homonymes, voir TIFF. Le Tag(ged) Image File Format généralement abrégé TIFF est un format de fichier pour image numérique. Adobe en est le dépositaire et le propriétaire initial (via Aldus). Plus… …   Wikipédia en Français

  • Tagged Image File Format — Extension .tif, .tiff Type MIME image/tiff modifier  …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”