Datacontent-addressable storageCAScontent hash

Content addressing

Definition

In content-addressed storage the key of a blob is a hash of its bytes, such as SHA-256, rather than a name chosen by the user.

In practice

Because the key follows from the content, identical chunks deduplicate automatically, blobs are immutable, and integrity can be verified on read by rehashing. File sync services split files into chunks and describe each version as a list of chunk hashes, so only changed chunks are uploaded. Git, container image layers and many backup tools use the same idea.

Cross-user deduplication can leak information: if uploading a file finishes instantly, the user learns someone else already stored it. Garbage collection needs reference counting or mark-and-sweep, since many files may share a chunk. Fixed-size chunking also shifts every later chunk after an insertion, which content-defined chunking avoids.

Example

A 40 MB file is split into 4 MiB chunks keyed sha256:9f2c...; after a small edit only one new chunk is uploaded and the new version lists ten hashes, nine of them unchanged.