Content-Defined Chunking (CDC) is a data deduplication algorithm that partitions a byte stream into variable-length chunks using a sliding window and a rolling hash function, where chunk boundaries are determined solely by the content itself. Unlike fixed-size chunking, CDC ensures that inserting or deleting bytes only affects the chunks immediately surrounding the change, leaving all subsequent chunks intact and identical to their pre-edit state.
Glossary
Content-Defined Chunking

What is Content-Defined Chunking?
A data deduplication method that splits a byte stream into variable-sized chunks based on content boundaries rather than fixed offsets, ensuring shift-resistant chunking.
This shift-resistance is critical for efficient delta compression and network deduplication in backup systems and distributed file systems. A common implementation uses a Rabin fingerprint to compute a hash over a sliding window, declaring a boundary when the hash value matches a predefined bitmask pattern, thereby creating chunks whose average size is statistically controlled by the mask's bit count.
Key Characteristics of CDC
Content-Defined Chunking (CDC) is a data deduplication method that splits a byte stream into variable-sized chunks based on content boundaries rather than fixed offsets. This ensures shift-resistant chunking, where insertions or deletions only affect local chunks, maximizing deduplication efficiency.
Shift-Resistant Boundary Calculation
CDC uses a rolling hash algorithm to scan a sliding window across the data stream. A chunk boundary is declared when the hash value of the current window satisfies a predefined condition, such as matching a specific bit pattern. This ensures boundaries are determined by local content rather than absolute position. If data is inserted or deleted, only the chunks directly overlapping the change are affected; all subsequent chunks remain identical to their original versions, enabling maximal deduplication.
Variable-Sized Chunking vs. Fixed-Size Blocks
Unlike fixed-size block chunking, which is vulnerable to the byte-shifting problem, CDC produces chunks of varying lengths. In fixed-size chunking, a single byte insertion at the beginning of a file shifts all subsequent block boundaries, rendering every block different. CDC's content-defined boundaries prevent this cascading failure. The trade-off is a slightly higher computational cost for hash calculation, but this is offset by dramatically improved storage efficiency in backup and synchronization systems.
Common Rolling Hash Algorithms
CDC implementations rely on efficient rolling hashes that can be updated in O(1) time as the window slides one byte forward. Key algorithms include:
- Rabin-Karp: A classic polynomial hash using a fixed modulus and base, easily updatable by subtracting the outgoing byte's contribution and adding the incoming byte's.
- Gear Hash: A fast, table-driven rolling hash designed specifically for CDC, offering better performance and more uniform distribution than Rabin-Karp.
- Buzhash: An XOR-based rolling hash that uses a precomputed table of random values for each byte, providing extremely fast computation.
Chunk Size Control with Min/Max Thresholds
Purely content-defined boundaries can produce pathological cases, such as chunks that are extremely small or excessively large. To prevent this, CDC algorithms enforce minimum and maximum chunk size constraints. If a boundary condition is met before the minimum size is reached, it is ignored. If no boundary is found by the maximum size, a cut is forced. This ensures chunks remain within a manageable range for indexing and storage, balancing deduplication granularity with metadata overhead.
Applications in Backup and Synchronization
CDC is the foundational technology behind many modern deduplication systems. Key applications include:
- Incremental Backup: Only new or changed chunks are uploaded, drastically reducing bandwidth and storage.
- File Synchronization: Tools like rsync use a related rolling hash approach to detect differences and transmit only delta chunks.
- WAN Optimization: Network appliances use CDC to cache chunks at both ends of a connection, avoiding redundant data transfer.
- Distributed Storage: Systems like Dell PowerProtect and Veeam use CDC to deduplicate data globally across backup repositories.
Relationship to Rabin Fingerprinting
The term Rabin fingerprinting is often used interchangeably with CDC, though it specifically refers to the mathematical hash function developed by Michael Rabin. A Rabin fingerprint treats a data window as a polynomial over a finite field and evaluates it modulo an irreducible polynomial. This provides strong collision resistance and is efficiently updatable. While Rabin's method is the most famous CDC technique, modern systems may use faster alternatives like Gear hashing that sacrifice some mathematical elegance for raw throughput.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Frequently Asked Questions
Explore the core mechanics and practical applications of content-defined chunking, the foundational deduplication technique that splits data based on its internal features rather than arbitrary offsets.
Content-defined chunking (CDC) is a data deduplication method that partitions a byte stream into variable-sized chunks based on the content's intrinsic properties rather than fixed offsets. It works by sliding a window over the data stream and computing a rolling hash or Rabin fingerprint. A chunk boundary is declared whenever the hash value satisfies a specific condition, such as a certain number of trailing bits matching a predefined pattern. This ensures that chunk boundaries are determined by the local data content. The result is shift-resistant chunking: if bytes are inserted or deleted in the middle of a file, only the chunks surrounding the change are affected, while all subsequent chunks remain identical and can still be deduplicated.
Related Terms
Content-defined chunking relies on a constellation of hashing, similarity, and data structure techniques. These related terms form the algorithmic toolkit for building shift-resistant, efficient deduplication systems.
Rabin Fingerprint
A foundational rolling hash algorithm used to compute a sliding window checksum over a byte stream. It uses polynomial arithmetic in a finite field to generate a pseudo-random fingerprint. Content-defined chunking implementations frequently use a Rabin fingerprint to identify content-based cut points by checking if the fingerprint's lower bits match a predefined bitmask pattern.
Rolling Hash
A hash function computed incrementally over a sliding window of data. When the window advances by one byte, the new hash is derived from the previous hash and the incoming/outgoing bytes in O(1) time, rather than re-hashing the entire window. This property is essential for efficiently scanning a byte stream to find chunk boundaries in content-defined chunking.
Gear Hashing
A fast, modern alternative to the Rabin fingerprint for content-defined chunking. Gear hashing uses a pre-computed lookup table of random 64-bit integers for each possible byte value. The rolling hash is updated via simple XOR and bit-shift operations, making it significantly faster on contemporary CPUs while maintaining good chunk size distribution properties.
Merkle Tree
A tree data structure where each leaf node is labeled with a cryptographic hash of a data block, and each non-leaf node is labeled with the hash of its children. When combined with content-defined chunking, a Merkle tree enables efficient, verifiable deduplication—two files sharing identical chunks will share identical subtrees, proving integrity without re-transmitting data.
Locality-Sensitive Hashing
An algorithmic technique that hashes similar input items into the same buckets with high probability. While content-defined chunking splits data into variable-sized blocks, LSH is used to efficiently find near-duplicate chunks or files by comparing compact hash signatures, enabling approximate deduplication at scale.
Content Identifier (CID)
A self-describing, content-addressed label used in distributed systems like IPFS. A CID combines a cryptographic hash of the content with metadata about the hash algorithm and encoding. Content-defined chunking generates the raw data blocks that are then hashed to produce CIDs, forming the basis of content-addressable storage architectures.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us