{
  "slug": "content-defined-chunking",
  "term": "Content-defined chunking",
  "aliases": [
    "CDC"
  ],
  "definition": "Content-defined chunking divides a byte stream using content-dependent boundary rules rather than only fixed offsets.",
  "note": "The aim is to retain reusable chunks despite shifted offsets; minimum-size suppression and maximum-size forced cuts can disrupt resynchronization. Boundary selection is separate from checking whole-chunk identity. [lbfs]\n\nFile framing matters: restarting at each file and chunking one concatenated stream can produce different reusable units. In a deterministic four-file example, reversing unchanged files preserves 152072 of 152072 reusable bytes with per-file chunking, but 110326 of 152072 bytes with concatenated framing. Every terminal chunk is included; these synthetic counts are not a workload savings estimate. [framing]\n\nRepetitive-input control: a constant-byte stream can force repeated maximum-length cuts even with a much smaller requested average. The complete 256-byte-value test in fastcdc-py 1.7.0 explains both 255 maximum-length cases and the 0x5D transient exception. Low boundary diversity does not by itself imply poor deduplication or compression. [repeated-study]\n\nFixed partitioning alone does not describe a synchronization algorithm. Rsync can search for its fixed-length basis blocks at arbitrary source offsets. In Hesela's 36-case native-rsync experiment, forced delta transfer after a one-byte prefix insertion retained all 262144 basis bytes as matches at both tested block sizes. [delta-study]\n\nEqual entropy can hide different partitions: two synthetic 1048576-byte XOR-255 complements preserve substring equality within each stream, yet pinned optimized RAM at horizon 327 yields 1757 versus 3197 chunks without a cap. Ordered-byte comparisons change; these are occurrences, not unique stored objects or capacity savings. [ram-source] [ram-study]\n\nIn the rare-high partition, 10.42% of chunks exceed 1308 B but contain 38.51% of bytes. [ram-exposure]",
  "related": [
    "metadedup",
    "deduplication",
    "fastcdc",
    "rolling-hash",
    "chunk-fragmentation",
    "gear-hash",
    "delta-synchronization",
    "deduplication-side-channel",
    "content-addressed-storage",
    "content-identifier"
  ],
  "citations": [
    {
      "id": "lbfs",
      "title": "Muthitacharoen, Chen and Mazieres. A Low-bandwidth Network File System. SOSP 2001, sections 3.1.1-3.1.3.",
      "url": "https://pdos.csail.mit.edu/papers/lbfs:sosp01/lbfs.pdf",
      "accessed": "2026-10-12"
    },
    {
      "id": "hesela-cdc",
      "title": "Content-defined chunking: boundaries are not identity",
      "url": "https://hesela.com/analyses/content-defined-chunking-boundaries/",
      "accessed": "2026-10-12"
    },
    {
      "id": "framing",
      "title": "Hesela. Deterministic FastCDC framing experiment: byte counts and complete chunk manifests.",
      "url": "https://hesela.dev/research/fastcdc-framing/results.json",
      "accessed": "2026-10-16"
    },
    {
      "id": "repeated-study",
      "title": "Hesela. Exhaustive constant-byte FastCDC experiment: pinned 1.7.0 Python API, source hashes, exact reconstruction and independent recurrence checks.",
      "url": "https://hesela.dev/research/gear-repeated/results.json",
      "accessed": "2026-10-20"
    },
    {
      "id": "delta-study",
      "title": "Hesela: native rsync after shifted offsets, with exact byte checks.",
      "url": "https://hesela.com/analyses/rsync-delta-shifted-blocks/",
      "accessed": "2026-10-20"
    },
    {
      "id": "ram-comparison",
      "title": "Gregoriadis et al. Benchmarking Content-Defined Chunking Algorithms for Data Deduplication. arXiv:2610.13704v1, IV-C and Appendix B.",
      "url": "https://arxiv.org/pdf/2610.13704v1",
      "accessed": "2026-11-10"
    },
    {
      "id": "ram-source",
      "title": "cdchunking-rs, revision 06e9a82f7e6575b47aeefcc005ed5a3393a79ff6: RAMChunker and MaybeOptimizedRAMChunker.",
      "url": "https://github.com/mrd0ll4r/cdchunking-rs/blob/06e9a82f7e6575b47aeefcc005ed5a3393a79ff6/src/ram.rs",
      "accessed": "2026-11-10"
    },
    {
      "id": "ram-study",
      "title": "Hesela. Native RAM boundary experiment: 120 observations, source hashes, complete chunk lengths and analytical controls.",
      "url": "https://hesela.dev/research/ram-calibration/results.json",
      "accessed": "2026-11-10"
    },
    {
      "id": "size-bias",
      "title": "Karl Sigman. Batch arrivals (2009), page 2, equations 3-4: discrete size bias and the second-moment ratio.",
      "url": "https://www.columbia.edu/~ks20/stochastic-I/stochastic-I-BA.pdf",
      "accessed": "2026-11-11"
    },
    {
      "id": "ram-exposure",
      "title": "Hesela. Exact byte-weighted exposure derived from six frozen RAM partitions, with a separate IID model.",
      "url": "https://hesela.dev/research/ram-calibration/byte-exposure/results.json",
      "accessed": "2026-11-11"
    }
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [
    "Uniform logical-byte selection sees a containing-chunk mean of sum(length squared)/sum(length), not the occurrence mean. All positive lengths, including terminal chunks, count. [size-bias]",
    "Byte-weighted tails count all logical bytes inside long chunks, not just bytes beyond the threshold; they do not estimate workload latency, capacity savings or edit amplification. [ram-exposure]"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-11",
  "provenance": [
    "Synthetic examples use the pinned pure-Python implementation with source hashes, exact byte equality and all terminal chunks; no speed or real-backup savings claim. [framing]",
    "The RAM experiment uses constructed byte strings and unmodified Rust library revision 06e9a82f7e6575b47aeefcc005ed5a3393a79ff6; it is not a paper-performance replication. [ram-study]",
    "RAM's uniform-IID mean averages conditional waiting times; the 2026 analysis distinguishes this from inverting mean success probability. The native variant and effective prefix length must also be recorded. [ram-comparison]"
  ]
}
