{
  "slug": "deflate",
  "term": "DEFLATE",
  "aliases": [
    "Deflate",
    "raw DEFLATE"
  ],
  "definition": "DEFLATE is a lossless compressed-data format combining length-distance references and Huffman coding, with an additional uncompressed block form.",
  "note": "Compressed blocks use fixed or dynamic Huffman codes; stored blocks carry uncompressed bytes. Match lengths are 3-258 bytes and backward distances are 1-32768 bytes. The distance limit bounds history, not stream length. Only stored blocks have a 65535-byte data limit. [rfc1951]\n\nRaw DEFLATE has no wrapper payload checksum. The zlib format adds Adler-32 and can identify a preset dictionary; gzip adds a member header, CRC32 and uncompressed size modulo 2^32. These formats are not interchangeable decoder inputs. [rfc1950] [rfc1952]\n\nA match can overlap the output it creates. A length 5 at distance 2 after XY appends XYXYX. Decoding therefore needs evolving history, not just a frozen copy of earlier bytes. [rfc1951]",
  "related": [
    "gzip",
    "compression-dictionary",
    "block-independent-compression",
    "zip-archive",
    "checksum"
  ],
  "citations": [
    {
      "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": "rfc1950",
      "title": "RFC 1950: zlib wrapper, dictionary identifier and Adler-32, section 2.2",
      "url": "https://www.rfc-editor.org/rfc/rfc1950.html",
      "accessed": "2026-11-11"
    },
    {
      "id": "rfc1952",
      "title": "RFC 1952: gzip member header and trailer, section 2.3.1",
      "url": "https://www.rfc-editor.org/rfc/rfc1952.html",
      "accessed": "2026-11-11"
    },
    {
      "id": "hesela-archives",
      "title": "Hesela: DEFLATE blocks, history and wrappers",
      "url": "https://hesela.com/analyses/compressed-archives-dictionary-dependencies/#deflate-foundations",
      "accessed": "2026-11-11"
    }
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [
    "Huffman coding is block-local, but references can cross block boundaries; locating a block does not guarantee independent decoding. [rfc1951]",
    "A wrapper checksum can detect corruption only when checked; RFC 1952 permits a compliant gzip decoder to skip its trailer. It does not authenticate the archive. [rfc1950] [rfc1952]"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-11",
  "provenance": [
    "Primary-format synthesis, not a performance benchmark or a historical claim about first implementation. RFC 1951 is Informational."
  ]
}
