{
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-11",
  "slug": "block-independent-compression",
  "term": "Block-independent compression",
  "aliases": [
    "Independent compressed blocks"
  ],
  "definition": "Block-independent compression encodes each block without requiring decoded history from preceding blocks.",
  "note": "LZ4 independent blocks can still share an external dictionary. Independence removes preceding-block history, not dictionary, boundary or size requirements. A raw block interface needs surrounding metadata to supply decoding bounds. [frame-spec] [block-format]\n\nRandom access also requires locating the requested block and deciding what integrity checks cover a partial read. A whole-frame content check cannot be completed from only one selected block. Reordering independently decodable blocks can change the restored object while each block checksum still passes. [hesela-lz4]\n\nThe liblz4 1.9.4 dictionary decompression API uses dictionary memory in place. Keep that buffer accessible throughout frame decoding; compression-side CDict creation instead copies the supplied content. This lifetime contract is separate from block independence and dictionary selection. The dictionary controls test supplied-byte identity, not use-after-free or parallel random access. [frame-api] [hesela-lz4]\n\nThe raw LZ4 partial decoder returns a requested prefix, not proof of whole-block validity. In Hesela's liblz4 1.9.4 control, it restores all 96 expected bytes from a block with an extra trailing byte while full decoding rejects that input. A shortened literal sequence can instead return fewer bytes without an error. Keep prefix length, input boundaries and object identity separate. [block-api] [hesela-lz4]\n\nBy contrast, DEFLATE permits references into prior blocks; block-local Huffman coding does not establish history independence. [rfc1951]",
  "related": [
    "lz4-frame",
    "compression-dictionary",
    "read-amplification",
    "checksum",
    "deflate"
  ],
  "citations": [
    {
      "id": "frame-spec",
      "title": "LZ4 Frame Format 1.6.4, pinned to v1.10.0: block independence, checksums and dictionaries",
      "url": "https://github.com/lz4/lz4/blob/v1.10.0/doc/lz4_Frame_format.md",
      "accessed": "2026-10-18"
    },
    {
      "id": "block-format",
      "title": "LZ4 v1.9.4 block format: out-of-band metadata and decoding bounds",
      "url": "https://github.com/lz4/lz4/blob/v1.9.4/doc/lz4_Block_format.md",
      "accessed": "2026-10-18"
    },
    {
      "id": "hesela-lz4",
      "title": "Hesela: LZ4 frame checks, block order and completion",
      "url": "https://hesela.com/analyses/lz4-frame-checks-block-order/",
      "accessed": "2026-10-18"
    },
    {
      "id": "frame-api",
      "title": "LZ4 v1.9.4 frame API: compression dictionary copy and decoding buffer lifetime",
      "url": "https://github.com/lz4/lz4/blob/v1.9.4/lib/lz4frame.h",
      "accessed": "2026-10-22"
    },
    {
      "id": "block-api",
      "title": "LZ4 v1.9.4 raw-block API: LZ4_decompress_safe_partial bounds and return contract",
      "url": "https://github.com/lz4/lz4/blob/v1.9.4/lib/lz4.h",
      "accessed": "2026-10-22"
    },
    {
      "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"
    }
  ]
}
