Expand description
A faster implementation of librsync in pure Rust.
This crate offers three major APIs:
- Signature::calculate(), which takes a block of data and returns a “signature” of that data which is much smaller than the original data.
- diff(), which takes a signature for some block A, and a block of data B, and returns a delta between block A and block B. If A and B are “similar”, then the delta is usually much smaller than block B.
- apply(), which takes a block A and a delta (as constructed by diff()), and (usually) returns the block B.
Structs§
- Indexed
Signature - A signature with a block index, suitable for calculating deltas.
- Signature
- An rsync signature.
- Signature
Options - Options for Signature::calculate.
- Signature
Parse Error - Indicates that a signature was not valid.
Enums§
- Apply
Error - Indicates that a delta could not be applied because it was invalid.
- Diff
Error - Indicates that a delta could not be calculated
Functions§
- apply
- Apply
delta
to the base database
, appending the result toout
. - apply_
limited - Apply
delta
to the base database
, writing the result toout
. Errors if more thanlimit
bytes would be written toout
. - diff
- Calculate a delta and write it to
out
. This delta can be applied to the base data represented bysignature
to attempt to reconstructdata
.