Skip to content

The ZIP format is older than the web. Here is why it still wins

Haven Zip team · · 2 min read

ZIP was released in February 1989 by Phil Katz's company PKWARE, a few months before Tim Berners-Lee wrote the proposal that became the World Wide Web. Almost every format from that era is a museum piece. ZIP is inside the document you edited this morning. Its survival was not luck; it was three design decisions that turned out to be exactly right.

Born from a lawsuit

Katz had written PKARC, a faster clone of the popular ARC compressor. The company behind ARC sued, and the settlement forced him to stop. His answer was a new format with a new name, and, decisively, a specification he placed in the public domain. Anyone could implement it without asking. Competing tools appeared within months, and the format spread with the bulletin board systems of the time.

The three decisions that made it last

First, the central directory. A ZIP file lists all of its members in a table at the very end. A reader can jump to that table, see every file name and size, and extract a single file without touching the rest. That is why you can browse a 4 GB archive instantly, and why streaming tools can append to an archive without rewriting it.

Second, per-file compression methods. Each entry records how it was compressed. Deflate became the standard, but the design allowed new methods like BZip2, LZMA and Zstandard to be added later without breaking old readers, which simply skip what they do not understand.

Third, the public specification, APPNOTE.TXT, still maintained by PKWARE. Because it was free to implement, ZIP became the container other formats built on.

The ZIPs you do not notice

A Word .docx, an Excel .xlsx, a PowerPoint .pptx, an EPUB book, a Java .jar, an Android .apk, an iOS .ipa, an OpenDocument .odt and a Firefox extension .xpi are all ZIP archives with a different extension. Rename one to .zip and Haven Zip opens it and shows the files inside. This is not a trick; it is the format working as designed.

Quirks that still bite

The original format used 32-bit fields, capping entries at 4 GB and archives at 65,535 files. ZIP64 extensions fixed that in 2001, but some old tools still stumble on very large archives. File names were originally stored in the DOS code page, which is why archives from one country used to show garbled names in another; the UTF-8 flag added in 2006 fixed it, and modern tools set it by default.

Timestamps are stored with two-second precision in local time, with no time zone. If you ever wondered why extracted files sometimes show a time an hour off, that is the reason.

Related

All posts