Rabin's fingerprint and diff algorithm.
Let's take a random buffer
a. We can produce from it an index which is a (lightweight) simple table of occurences (
string) found into
From this index, we can get a diff with another random buffer
b such as:
let index = make a in let diff = delta index ~source:a ~target:b in assert (apply a diff = b)
A diff is a list of
apply is a simple function which needs the source
a to reconstruct
type hunk =
The type of the compression.
delta index ~source ~target returns a compression list between the Rabin's fingerprint of a
index with the target
Note: the given
source must be the same (not necessary physically) than the source used to produce