Comprehensive C Archive Network

Module:

bdelta

Summary:

Generate and apply binary deltas

Author:

Joey Adams <joeyadams3.14159@gmail.com>

Description:

This library takes two strings containing binary data, and produces a
"patch" that can be applied to the first one to produce the second one.
It can be used to save bandwidth and disk space when many texts differing
by a small number of bytes need to be transmitted or stored.

Patches produced by this version of the library can be applied using future
versions, but not past versions.

bdelta implements the algorithm described in
An O(ND) Difference Algorithm and Its Variations by Eugene W. Myers.
Because its memory usage and expected running time are O(N + D^2),
it works well only when the strings differ by a small number of bytes.
This implementation stops trying when the strings differ by more than
1000 bytes, and falls back to producing a patch that simply emits the new
string.

Thus, bdelta does not save any space when given two strings that differ by
more than 1000 bytes. This may be improved in a future version of the
library.