{
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "With checks enabled, liblz4 1.9.4 can return stored-block bytes before detecting their checksum error. Successful output is not yet a verified restore.",
      "citationIds": [
        "frame-implementation",
        "hesela-lz4"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-22",
  "slug": "lz4-frame",
  "term": "LZ4 frame",
  "aliases": [
    "LZ4 framing"
  ],
  "definition": "An LZ4 frame wraps data blocks in a descriptor and end marker, with optional length, dictionary identification and integrity checks.",
  "note": "Frame completion, consumed input and output are separate. A complete first frame can leave input unread; a truncated end marker can follow all expected bytes. [frame-api]\n\nMoving independent blocks with their checksums can preserve block checks but fail the content checksum. Length cannot detect same-length reordering. [hesela-lz4]\n\nIn liblz4 1.9.4, Dict-ID is exposed, not enforced against supplied dictionary bytes. A matching ID can accompany wrong output with block checks alone. A later pointer does not rebind the dictionary; mutating retained bytes changes independent-block output. Keep it stable throughout decoding. [frame-api] [frame-implementation] [hesela-lz4]\n\nSkippable and empty data frames both finish with zero output; frameType distinguishes them. Consuming all input does not prove inventory or bind skipped metadata. Completion resets dictionary binding; context reuse needs resupply for each dictionary-dependent frame. [frame-api]\n\nIn liblz4 1.9.4, skipChecksums persists until completion. Controls skip content and stored-block checks but reject compressed-block and header checksum errors. Clearing it mid-frame cannot restore checks. A checksum flag alone is therefore not evidence of verification. [frame-api] [frame-implementation] [hesela-lz4]\n\nLZ4F_headerSize sizes, not validates. Resume after LZ4F_getFrameInfo at its consumed count, not the sized header length. [frame-api]\n\nIn liblz4 1.9.4, contentSize zero means unknown, not necessarily empty. Absent and explicitly zero fields decode nonempty controls; wrong nonzero sizes fail. The format permits skipping size validation. Check trusted expected length separately. [frame-api] [frame-spec] [hesela-lz4]",
  "related": [
    "block-independent-compression",
    "compression-dictionary",
    "checksum",
    "skippable-frame",
    "restore-test",
    "lz77"
  ],
  "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": "frame-api",
      "title": "LZ4 v1.9.4 public frame API: preferences and LZ4F_decompress completion contract",
      "url": "https://github.com/lz4/lz4/blob/v1.9.4/lib/lz4frame.h",
      "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-implementation",
      "title": "LZ4 v1.9.4 implementation: frame Dict-ID parsing and LZ4F_decompress_usingDict",
      "url": "https://github.com/lz4/lz4/blob/v1.9.4/lib/lz4frame.c",
      "accessed": "2026-10-22"
    }
  ],
  "provenance": [
    "The original 12 cases use no dictionary; a separate 18-case synthetic supplement supplies correct, wrong or missing dictionary bytes. Both use liblz4 1.9.4, not a measured corruption rate or security guarantee.",
    "A separate 16-case two-block lifecycle supplement deliberately replaces an argument or mutates retained bytes. Allocations remain live; no use-after-free, concurrency, performance or field-rate result is claimed.",
    "Ten synthetic multi-frame controls use the same dictionary across data frames; skipped metadata is outside the payload-only acceptance rule. No cross-dictionary switching or wrapper-wide behavior is inferred.",
    "24 checksum-field controls and two reused-context controls execute liblz4 1.9.4. Payload bytes remain unchanged. A v1.10.0 implementation comparison is source-only; no second-version reproduction or vulnerability claim.",
    "A separate 32-case native streaming matrix changes input partitioning and output capacity. Stored-payload mutations can return all 8192 altered bytes before checksum failure; all mutated cases reject. Counts exclude error-returning calls; no second-version or performance result.",
    "24 bounded native size controls preserve identical block records and footers while changing the optional size field and descriptor checksum. Two buffer capacities and two block representations; no resource-exhaustion or second-version runtime test."
  ]
}
