Why CompuServe Chose LZW Compression for GIF
In 1987, CompuServe introduced the Graphics Interchange Format (GIF) to replace its older, inefficient run-length encoded formats for transmitting color images over slow networks. To achieve fast downloads and high visual fidelity, lead developer Steve Wilhite selected the Lempel-Ziv-Welch (LZW) compression algorithm. CompuServe chose LZW primarily because it offered superior lossless compression for 256-color images, functioned efficiently in a single pass over low-bandwidth dial-up connections, and was widely believed at the time to be free from intellectual property restrictions.
During the late 1980s, computer users accessed online services like CompuServe via dial-up modems operating at speeds between 300 and 2400 baud. Bandwidth was scarce, and downloading large graphical files took significant time and incurred high telecommunications costs. CompuServe required a format that could sharply reduce file sizes without sacrificing the original quality of the image.
LZW was an ideal technical fit for the type of imagery common at the time. GIF was engineered around an indexed palette of up to 256 colors (8-bit color), which was standard for systems like the Commodore Amiga, Atari ST, and IBM PC VGA cards. LZW is a dictionary-based algorithm that replaces repetitive strings of data with short codes. Because 8-bit images of charts, user interfaces, diagrams, and simple graphics contain large blocks of identical or repeating pixel sequences, LZW compressed them far more effectively than basic run-length encoding (RLE) or Huffman coding alone.
Another critical factor was LZW’s ability to process data in a single pass. Unlike algorithms that require analyzing the entire image to build a static dictionary before transmission, LZW dynamically builds its code table during both compression and decompression. This meant CompuServe could stream image data sequentially line by line. A user's computer could begin reconstructing and displaying the image immediately as the packets arrived, rather than waiting for the entire file and its metadata to download first.
Lossless integrity was also paramount. Photography on consumer hardware was rare in 1987, so digital images were predominantly computer-rendered graphics, graphs, and line art. Lossy algorithms like JPEG (which was not finalized until years later) degrade sharp edges and solid blocks of color. LZW guaranteed that every pixel rendered identically to the original source.
Finally, CompuServe believed LZW was available in the public domain. Terry Welch had published the algorithm in a widely read 1984 issue of IEEE Computer magazine, making it accessible and popular among software developers. At the time of GIF’s release, CompuServe’s engineers were unaware that Welch’s employer, Sperry Corporation (which merged into Unisys in 1986), had filed a patent on the algorithm. It was not until the mid-1990s that Unisys enforced its patent claims, but by then, LZW’s technical efficiency had already cemented GIF as the universal visual standard of the early web.