How it works
After checking access, the API returns a revision manifest and short-lived download capabilities. The client compares checksums against its local block cache, fetches missing objects, verifies them, and assembles them in order. Moving only changed blocks is called delta sync. With a 400 MB file split into 100 fixed 4 MB blocks, an edit that overwrites bytes inside one block moves 4 MB, not 400 MB. Range requests and a nearby edge can help large downloads.
That saving assumes the edit stays in place. Insert one byte near the start and every later byte shifts, so every later block gets new contents and a new hash, and the client downloads nearly all 400 MB again. Content-defined chunking exists to fix this. It slides a rolling hash over the file and cuts a chunk wherever the hash matches a chosen pattern, so boundaries follow the content rather than fixed offsets. After an insertion, only the chunks near the edit change. The backup tools restic and Borg chunk this way. The costs are client CPU, variable chunk sizes, and larger manifests, and it gains little on compressed or encrypted files, where a small edit can change most later bytes.
Content-addressed blocks, named by the hash of their bytes, are easy to cache, but current-revision pointers and file listings need invalidation or short lifetimes. Private files need authorization before content delivery. Account-scoped deduplication avoids cross-user leaks: a global “already stored” reply tells anyone whether a file exists elsewhere. Cold storage can save space for old revisions but adds retrieval delay.
A file changes one block out of 100 through an in-place edit. What should a synchronized laptop transfer, and what changes if the user instead inserts a paragraph near the start?
For the in-place edit, fetch the new manifest, reuse 99 verified local blocks, and download and verify only the changed block. With fixed blocks, an early insertion shifts everything after it, so nearly every block changes; content-defined chunking limits the transfer to chunks near the edit.
Use this as a guide for self review; written answers are not graded.Keep in mind
- Reuse verified blocks rather than transferring every file in full.
- Fixed blocks save bytes for in-place edits; an insertion shifts later blocks unless chunks follow the content.
- Cache and deduplication rules must preserve permissions.