GIF for Flat Art
The GIF (Graphics Interchange Format) format was first formally specified by CompuServe in 1987. (CompuServe is one of the original online services, dating back to the late 1960s. It is now owned by AOL.) The current specification is GIF89a, which you can download from my Web site ( http://bw.org/documents/GIF89a.txt).
The GIF format is a palette-based image format that supports a palette of up to 256 colors. The compression used in the GIF format is a form of LZW (Lempel-Ziv-Welch) compression, defined in a paper by Terry Welch ("A Technique for High Performance Data Compression." IEEE Computer, June 1984). Welch's work was based on earlier work by Jacob Ziv and Abraham Lempel ("A Universal Algorithm for Sequential Data Compression." IEEE Transactions on Information Theory, May 1977). LZW is a lossless compression method that works by tokenizing repeating strings of bits. Because the data stream in the GIF format is encoded row-by-row, it tends to compress better if there are large horizontal areas of similar colors. In other words, it works best for flat-colored art, and not very well for continuous-tone or photographic images.