

Most ZIP files (but not self-extracting ZIP files) happen to begin with 'P' 'K' 0x03 0x04.
#Pkware zip software#
There seems to be no theoretical limit to how far back you may have to search for the signature, but some software limits it to around 64KB, which is the maximum length of a comment. However, it will appear earlier if the file contains a "ZIP file comment" (common in the BBS era, but rare today), or for various other reasons. The byte sequence 'P' 'K' 0x05 0x06 (the "end of central directory signature") appears somewhere in the file, usually beginning exactly 22 bytes from the end of the file. In such cases, the compressed data format could turn out to be raw DEFLATE, or zlib, or gzip. The term "ZIP compression" is sometimes misleadingly used to mean DEFLATE (which is by far the most common compression scheme used in ZIP files).

See Category:ZIP based file formats for a list of such formats. zip is the usual file extension, ZIP-formatted files can be found with many other extensions since a number of other file formats use ZIP compression but store their files in application-specific extensions. Designed to promote interoperable implementations, the draft ISO/IEC 21320-1 prohibits compression other than using DEFLATE, segmentation or multiple volumes, and features that are subject to patents. As of November 2012, a discussion draft is available. In 2011 work began on an interoperable subset of the latest APPNOTE.TXT with the intention of publication as ISO/IEC 21320-1, Document Container File - Part 1: Core. Extensions incorporated into the specification that have been widely adopted are: long filenames large files (using a technique known as ZIP64) and filenames in UTF-8. Many implementations limit the use of compression to the DEFLATE algorithm, introduced with version 2. ZIP implementations vary in their support for features in the specification from PKWARE, particularly features added since version 2 (1993), some of which are protected by patents and require licensing. Many programs have been released for a variety of operating systems to compress and decompress ZIP files, and native support for the format is built into several popular operating systems.

This resulted in Katz creating a new file format, which rapidly overtook ARC in popularity (to a large extent because of BBS sysops, then the primary users of such compression, resenting the lawsuit). It was created in 1989 as the native format of the PKZIP program, which was introduced by Phil Katz (with co-creator Gary Conway) in the wake of a lawsuit (which he lost) against him by the makers of the then-popular ARC program (and file format) for copyright and trademark infringement in an earlier program PKARC which had been file-compatible with ARC. ZIP is one of the most popular file compression formats. Not to be confused with Zip disk, an unrelated disk cartridge unit.
