Global Archive Standard.zipMIME: application/zip, application/x-zip-compressed

ZIP Format Specification: The Universal Data Compression Archive

Understand Central Directory headers, DEFLATE compression, AES-256 encryption, and client-side extraction.

ZIP is an archive file format created by Phil Katz in 1989 for PKWARE as a successor to ARC. Standardized as ISO/IEC 21320-1, ZIP combines multiple files and directory hierarchies into a single compressed container using DEFLATE compression. Because it stores a dedicated Central Directory record at the end of the file, individual files can be randomly accessed and extracted without reading or decompressing the entire archive from the beginning.

Format Specification & Header Signature

Core file signatures, developer metadata, and standard RFC specifications:

Magic Bytes (Hex Signature)50 4B 03 04 (PK.. - Local File Header)
MIME Media Typeapplication/zip, application/x-zip-compressed
Standard / SpecificationPKWARE .ZIP File Format Specification / ISO/IEC 21320-1
Initial Developer / OrganizationPKWARE (Phil Katz) (February 1989)
Standard SpecificationPKWARE APPNOTE / ISO/IEC 21320-1
Default CompressionDEFLATE (RFC 1951) or Store (uncompressed)
Maximum Size (Standard)4GB (expanded to 16 Exabytes with ZIP64)
Encryption StandardWinZip AES-256 or legacy PKZIP stream cipher

Operating System & Browser Compatibility Matrix

Where .zip is natively supported without third-party codecs:

Platform / EnvironmentNative SupportImplementation Notes
Universal System SupportSupportedBuilt-in native zip folder extraction in Windows Explorer, macOS Archive Utility, iOS Files, Android, and Linux unzip.

Advantages of PKZIP Compressed Archive

  • •Universal native OS support: extract and compress archives without installing third-party utilities
  • •Random file access: extract a 2KB text file from a 2GB archive instantly without uncompressing everything
  • •Serves as the underlying container for DOCX, XLSX, PPTX, APK, EPUB, and JAR files

Limitations & Trade-Offs

  • •Lacks solid compression: compressing 100 similar small files yields larger files than tar.gz or 7z
  • •Legacy PKZIP encryption is cryptographically broken and vulnerable to known-plaintext attacks (use AES-256)
  • •Historically lacked UTF-8 filename encoding standardization prior to APPNOTE 6.3.0

The Central Directory Architecture Advantage

A ZIP file writes each file stream sequentially, followed by an End of Central Directory (EOCD) record at the very end of the file. To list files, an archive program seeks directly to the last 22 bytes, reads the EOCD offset, and parses file paths without scanning millions of compressed data bytes.

This allows cloud storage providers and web servers to stream individual byte-ranges of a remote ZIP file over HTTP Range headers.

Frequently Asked Questions about PKZIP Compressed Archive

What is the difference between ZIP and TAR.GZ?

ZIP stores and compresses each file individually with an index at the end, allowing instant single-file extraction. TAR combines all files into a single continuous stream first, then compresses with GZIP (solid compression), yielding smaller sizes but requiring sequential decompression.

Can DocSwift process ZIP files in the browser?

Yes! Using client-side WebAssembly and JSZip libraries, DocSwift extracts, analyzes, and bundles compressed files locally in browser memory without sending files over the network.