7-Zip Archive Format (7z)
7z often achieves better compression than ZIP/gzip. Understanding stream/header separation helps when debugging extraction tools and archive security policies.
What It Defines
Modern archive container: 6-byte signature + version, start header CRC, then packed streams (often LZMA/LZMA2 compressed) and header streams describing file entries, sizes, and compression methods. MIME type: `application/x-7z-compressed`.
Canonical (Normative)
Convenient (Practical)
Related References
Joint ISO/IEC technical committee (JTC 1) publishes many of the binary file formats the web depends on: JPEG, PDF, MP4/ISOBMFF, ZIP (ISO/IEC 21320), and office document containers. Specs are often available via national body mirrors; some are freely readable online.
Related Specs
ZIP is everywhere — downloads, backups, Java JARs, Office Open XML. Central-directory-at-end structure, path traversal (`../../`), and zip bombs are critical security concerns.
`.gz` files, HTTP Content-Encoding: gzip, and tarball distribution (`.tar.gz`) all depend on this format. Know header vs raw DEFLATE stream.
Common on Linux for compressed tarballs and package sources. Block header + CRC footer structure; decompression bombs are a security concern like gzip/zip.
Docker layers, npm pack, Linux package sources, and backup workflows use tar. ustar and PAX extensions define long filenames and metadata.