{
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "Complete gzip validation does not establish coverage of the decoded container. Concatenated gzip members can decode to separately terminated TARs, whose default reader stops after the first.",
      "citationIds": [
        "hesela-tar-boundary"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-02",
  "slug": "gzip",
  "term": "Gzip",
  "aliases": [
    "GZIP",
    ".gz"
  ],
  "definition": "Gzip is a lossless compressed-file format whose file consists of a sequence of members, each carrying a compressed data stream and a trailer with CRC32 and uncompressed size modulo 2^32.",
  "note": "A member is a compression unit, not a TAR entry or full recovery object. Removing one can leave valid but incomplete input. Python gzip handles concatenation; zlib inflate stops at a member boundary and leaves continuation to its caller. Method 8 is DEFLATE, not a zlib wrapper. [rfc1952] [python-gzip] [zlib-v13] [rfc1951]\n\nCPython 3.12.3/zlib 1.3 controls returned expected bytes before EOF exposed a bad trailer; close did not finish validation. decompressobj plus flush returned bytes with eof false. unused_data marks post-stream input, not validation success. [python-zlib] [hesela-gzip]\n\nData CRC32 excludes headers. Optional FHCRC is the low 16 header-CRC bits; RFC 1952 permits skipping it but requires rejection of reserved flag bits. Tested Python accepted stale FHCRC and reserved flags rejected by zlib 1.3 and GNU gzip 1.12. Resealing a name change restored acceptance, not identity. [rfc1952] [cpython-gzip] [zlib-header-inflate] [hesela-gzip-header]\n\nNative gzread accepts plain input and ignores trailing non-gzip material. Read failure can precede successful close; zero read can accompany truncation reported by gzerror and close. Preserve read and terminal errors. [zlib-v13] [hesela-gzip-header]\n\nTested GNU 1.14 lists aggregate decoded size but the last member's CRC; 1.12 lists last-member size. GNU 1.11 can report unknown sizes on a pipe despite exit zero. Modern listing performs decompression; it is not a free output-budget check. Full intended length and identity need separate expectations. [gnu-gzip-114] [hesela-gzip-list]\n\nMatching version labels do not identify interpreter or library binaries. Replay separates changed outcomes from changed environment metadata; agreement on tested inputs is not independent replication. [hesela-gzip-replay]",
  "related": [
    "archive-member",
    "backup-manifest",
    "checksum",
    "zstandard",
    "restore-test",
    "bgzf",
    "deflate"
  ],
  "citations": [
    {
      "id": "rfc1952",
      "title": "RFC 1952: GZIP file format specification 4.3, sections 2.2, 2.3.1 and 2.3.1.2",
      "url": "https://www.rfc-editor.org/rfc/rfc1952.html",
      "accessed": "2026-11-09"
    },
    {
      "id": "python-gzip",
      "title": "Python 3.12 gzip documentation: multi-member decompression and errors",
      "url": "https://docs.python.org/3.12/library/gzip.html",
      "accessed": "2026-10-18"
    },
    {
      "id": "python-zlib",
      "title": "Python 3.12 zlib documentation: eof, unused_data and unconsumed_tail",
      "url": "https://docs.python.org/3.12/library/zlib.html",
      "accessed": "2026-10-18"
    },
    {
      "id": "cpython-gzip",
      "title": "CPython v3.12.3 gzip.py: GzipFile.close and _GzipReader._read_eof",
      "url": "https://raw.githubusercontent.com/python/cpython/v3.12.3/Lib/gzip.py",
      "accessed": "2026-11-09"
    },
    {
      "id": "zlib-v13",
      "title": "zlib v1.3 public interface: inflate stops at a gzip member boundary",
      "url": "https://raw.githubusercontent.com/madler/zlib/v1.3/zlib.h",
      "accessed": "2026-11-09"
    },
    {
      "id": "hesela-gzip",
      "title": "Hesela: 42 gzip API operations distinguish trailer checks, member completion and expected content",
      "url": "https://hesela.com/analyses/compressed-archives-dictionary-dependencies/#gzip-coverage",
      "accessed": "2026-10-18"
    },
    {
      "id": "hesela-tar-boundary",
      "title": "Hesela: TAR boundaries after complete gzip validation, 48 reader observations",
      "url": "https://hesela.com/analyses/compressed-archives-dictionary-dependencies/#tar-boundary",
      "accessed": "2026-10-21"
    },
    {
      "id": "zlib-header-inflate",
      "title": "zlib v1.3 inflate.c: FLAGS and HCRC checks",
      "url": "https://raw.githubusercontent.com/madler/zlib/v1.3/inflate.c",
      "accessed": "2026-11-09"
    },
    {
      "id": "hesela-gzip-header",
      "title": "Hesela: gzip header checks and native reader status, 238 designed observations",
      "url": "https://hesela.com/analyses/compressed-archives-dictionary-dependencies/#gzip-header-validation",
      "accessed": "2026-11-09"
    },
    {
      "id": "rfc1951",
      "title": "RFC 1951: DEFLATE format, sections 2 and 3.2-3.3 (Informational, May 1996)",
      "url": "https://www.rfc-editor.org/rfc/rfc1951.html",
      "accessed": "2026-11-11"
    },
    {
      "id": "gnu-gzip-114",
      "title": "GNU gzip 1.14 release: multi-member listing fix (9 April 2025)",
      "url": "https://lists.gnu.org/archive/html/info-gnu/2025-04/msg00007.html",
      "accessed": "2026-11-28"
    },
    {
      "id": "hesela-gzip-list",
      "title": "Hesela: gzip listing size and CRC scope, 99 version/input observations",
      "url": "https://hesela.com/analyses/compressed-archives-dictionary-dependencies/#gzip-listing",
      "accessed": "2026-11-28"
    },
    {
      "id": "hesela-gzip-replay",
      "title": "Hesela: gzip replay separates experimental outcomes from environment identity",
      "url": "https://hesela.com/analyses/compressed-archives-dictionary-dependencies/#gzip-replay-environment",
      "accessed": "2026-12-02"
    }
  ],
  "provenance": [
    "Primary-source synthesis plus seven synthetic fixtures, not field reliability evidence. No third-party payload or source code redistributed.",
    "Reproduction: https://hesela.dev/research/gzip-read-coverage.py ; observations: https://hesela.dev/research/gzip-read-coverage.json . Python standard library only; caller-returned bytes, not physical I/O.",
    "Header/flag experiment: https://hesela.dev/research/gzip-header-contract.zip . Original 2026-10-22 captures retained; 2026-11-09 same-host replay matches fixtures and outcomes with kernel/libz-binary drift recorded separately. No independent review or field-rate claim.",
    "GNU listing controls: https://hesela.dev/research/gzip-list-evidence/reproduction.zip . Three versions, eleven synthetic fixtures, three input modes; same-host replay, not independent peer replication."
  ]
}
