Infrastructure
OTA Updates Explained: Delivering Firmware at Scale
OTA updates move a signed software package from a vendor's firmware update server to a device in the field, verify it ...
Delta updates send only the bytes that changed between the installed version and the new one, so clients download a binary patch instead of the full build. For native binaries and game data, a well-built delta is typically 2% to 20% of the full file, and specialized diffing of executables can go below 1%. The gains depend less on the diff algorithm than on how you build, name, cache and fall back from the patches.
Google's 2009 Courgette announcement for Chrome shows the spread: a full update of about 10.4 MB became a 704 KB patch with bsdiff and about 79 KB with Courgette, which is roughly 1% of the full download. In 2016, Google's Android developer posts reported that File-by-File patching on Google Play made app updates about 65% smaller than full APKs on average.
Delta updates save between 50% and 99% of transfer per updated client, and the spread comes from the artifact. Uncompressed executables and asset archives with stable layouts diff well. Anything that is compressed, encrypted or reordered on each build looks random to a byte-level differ, and the patch grows toward the full file size.
A delta (or binary diff patch) is an encoded set of copy and insert instructions that rebuilds a target file from a source file the client already holds. The patch carries only the new bytes plus addresses into the old file. The client needs the exact source bytes, and every scheme depends on that requirement.
In most usage the terms are interchangeable: both mean shipping the difference between two versions instead of the full payload. Some vendors draw a line. They use "differential" for a patch built against one fixed baseline, such as the last major release, and "delta" for a patch built against the immediately previous version. The fixed-baseline model needs fewer artifacts, but its patches grow with every release.
Adding one function to a binary shifts every later code address, so thousands of call targets and relative jumps change even though the logic did not. bsdiff tolerates this by encoding approximate matches as byte-wise differences, which compress well. Courgette and its Chromium successor Zucchini go further. They disassemble the binary, replace addresses with symbolic labels, diff that representation, and reassemble on the client. That is how a 704 KB patch becomes 79 KB.
The right binary diff patch tool depends on file size, the memory available on the build host and the client, and whether the content is executable code. The table below is ordered alphabetically. Memory figures come from each tool's own documentation or design notes.
| Tool | Approach | Strength | Limitation |
|---|---|---|---|
| bsdiff / bspatch | Suffix sorting, approximate matches, bzip2 output | Small patches on executables, very widely deployed | Diffing needs about 17 times the old file size in RAM, and patching needs old plus new in memory |
| Courgette / Zucchini | Disassemble, relabel addresses, diff, reassemble | Order-of-magnitude gains over bsdiff on x86 and ARM code | Only helps executable formats it understands, and the integration lives inside Chromium |
| HDiffPatch | bsdiff-like matching with streaming and directory diffs | Bounded patch-time memory, handles whole directory trees | Smaller ecosystem and fewer audited integrations |
| xdelta3 | VCDIFF encoding per RFC 3284 with a sliding source window | Standard format, streams large files, fast | Misses moved data outside the source window, and patches are larger than bsdiff on code |
| zstd patch-from | Old file used as a compression dictionary | Very fast to build and apply, and the decoder is already in many stacks | The window must cover the reference file, so memory grows with file size, up to about 2 GiB references |
For multi-gigabyte game or data files, xdelta3 or zstd keep build and client memory sane, and bsdiff-class tools only pay off on executables you can afford to diff on a large build host.
For xdelta3, encode with -e, name the old file with -s, and use -9 for maximum compression. The setting people miss is -B, the source window size, which defaults to 64 MiB. If a changed block moves further than the window, xdelta3 re-sends it as literal data. Set -B to at least the old file size when build-host RAM allows. Decode with -d and the same -s source.
For zstd, compress the new file with the patch-from flag pointing at the old file, and add the long flag with a window log that covers the reference: a log of 30 covers 1 GiB, and 31 is the 64-bit maximum. The decoder refuses windows above 128 MiB unless you pass the same long value or raise the memory limit, so ship that setting in the client, not only in CI.
For bsdiff, budget build-host RAM at the larger of 17 times the old size or 9 times the old size plus the new size. A 1 GB file needs roughly 17 GB. On the client, bspatch holds the old and new files in memory, which rules it out for large assets on phones and consoles.
A one-byte change inside a deflate stream alters every compressed byte after it, so ZIP, APK, JAR and compressed pak files diff almost as badly as random data. The fix is to diff the decompressed content, then recompress on the client with byte-identical settings. Google's archive-patcher and Android's puffdiff do this, and it only works if your compressor settings are deterministic. Per-build encryption keys defeat diffing entirely. Encrypt with stable keys per file, or diff before encryption. Code signing adds only a small changed region and is rarely the problem.
Delivery has four parts: a short-TTL signed manifest, immutable patch objects, a full-build fallback, and a release order that warms caches before clients look. The client reads the manifest, finds an entry matching its installed content hash, downloads that patch, applies it, verifies the SHA-256 of the result, and falls back to the full file on any mismatch.
This is a cache-friendly workload: a few dozen immutable objects requested by millions of clients within hours. BlazingCDN's software update delivery setup fits this pattern, with objects up to 50 GB, origin shield with request coalescing, and cache warm-up through the API, so the patch set can be in cache before the manifest flips.
Most teams build one patch from N-1 and send everyone else the full build. Take 10 million installs and a 400 MB full build. Assume this version distribution and these delta sizes (our estimates for a weekly-release desktop or game client): 70% of installs on N-1 with a 25 MB patch, 15% on N-2 with 45 MB, 8% on N-3 with 60 MB, and 7% on older versions taking the full build. Assume 2% of patch attempts fall back to the full build.
| Cohort | Installs | Payload | Egress per release |
|---|---|---|---|
| Full build to everyone (baseline) | 10,000,000 | 400 MB | 4,000 TB |
| N-1 patch | 7,000,000 | 25 MB | 175 TB |
| N-2 patch | 1,500,000 | 45 MB | 67.5 TB |
| N-3 patch | 800,000 | 60 MB | 48 TB |
| Older versions, full build | 700,000 | 400 MB | 280 TB |
| Fallbacks (2% of 9.3 million patch clients) | 186,000 | 400 MB | 74.4 TB |
The patch strategy totals 644.9 TB against 4,000 TB, an 84% cut, but the 7% of installs on old versions still account for 280 TB, which is 43% of the remaining egress.
The long tail, not N-1, sets the bill. Adding one more patch for N-4, say 400,000 installs at 75 MB, saves 400,000 times 325 MB, which is 130 TB per release, for one extra artifact of 75 MB. The rule this blog recommends: build a patch for every source version whose install count times (full size minus patch size) exceeds a few terabytes. At these sizes, that means any version with more than about 10,000 active installs. Storage is negligible. The real costs are CI minutes and test coverage.
Content-defined chunking (casync, OSTree, Steam-style depots) splits files into hashed chunks of roughly 64 KB to 1 MB, and clients fetch only the chunks they lack. Nothing is generated per version pair, and any old version can update. The cost is a coarser granularity: a scattered change pulls whole chunks, and a large update becomes thousands of small requests, which raises the share of time spent on request overhead and per-request cache lookups.
Track the fallback ratio: full-build downloads from clients that first fetched a patch, divided by patch downloads. Anything above 1% to 2% points to source drift or a bad patch. During the first hour of a release, read the edge cache status and Age headers on patch objects to confirm warm-up worked. Finally, compute egress per successfully updated client from logs and compare it with the table above.
Patches pay off for desktop clients, game builds and firmware above about 100 MB that release weekly or monthly to large install bases, where per-release egress reaches hundreds of terabytes. They pay off less for apps under about 20 MB, for platforms where the store already diffs on your behalf, and for builds you cannot make deterministic. If your packaging re-encrypts or recompresses everything per build, fix the pipeline first. Otherwise you will be shipping full-size "patches" with extra failure modes.
Mostly yes: both ship the difference between versions instead of a full download. Some vendors reserve "differential" for patches built against one fixed baseline release and "delta" for patches against the immediately previous version. Fixed-baseline patches need fewer artifacts per release but grow larger over time, while previous-version patches stay small but multiply as you support more source versions.
A binary diff patch is typically 2% to 20% of the full file for executables and stable asset archives. Specialized tools do better: Google's 2009 Courgette results showed a Chrome update of about 10.4 MB patched in about 79 KB. Compressed or per-build encrypted content can produce patches close to full size unless you diff the decompressed data.
bsdiff needs roughly 17 times the old file size in RAM to generate a patch, so a 1 GB input needs about 17 GB on the build host. Applying with bspatch needs the old and new files in memory together. For multi-gigabyte files, xdelta3 or zstd with the patch-from flag keeps memory bounded on both sides.
The client should verify the SHA-256 of the result against the signed manifest and download the full build on any mismatch. Hashing the installed source file before fetching the patch avoids wasting a download on a drifted install. Report every fallback in telemetry, because a rising fallback ratio is often the only signal of a broken patch.
This week, pull your active install base by version and plug it into the cohort math above. Find every version whose installs times (full size minus patch size) exceeds a few terabytes, and add those patches to CI. Then add two client metrics: apply success with the failure reason, and fallback-to-full downloads per release. After one release you will know whether your egress is going to the N-1 crowd or to the tail. Most teams find the tail is where the savings are.
If your patch set and full builds are heavy, BlazingCDN's Files on Demand for installers and patches serves them with cache warm-up through the API. The 14-day testing period runs on real production traffic, so you can check the fallback and egress numbers on an actual release.
Heavy traffic.
Light bill.
The CDN for video and large traffic
Infrastructure
OTA updates move a signed software package from a vendor's firmware update server to a device in the field, verify it ...
Infrastructure
A checksum is a short, fixed-length value computed from a file's bytes so that any change to those bytes produces a ...
Industries
Public crowdsourced speed tests from 2024 and 2025 put median 5G download speeds in mature markets at roughly 100 to ...
Industries
Choosing an enterprise CDN for software delivery comes down to four numbers that matter more than any feature list: ...