Crate fast_rsync

Source
Expand description

A faster implementation of librsync in pure Rust.

This crate offers three major APIs:

  1. Signature::calculate(), which takes a block of data and returns a “signature” of that data which is much smaller than the original data.
  2. 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.
  3. apply(), which takes a block A and a delta (as constructed by diff()), and (usually) returns the block B.

Structs§

IndexedSignature
A signature with a block index, suitable for calculating deltas.
Signature
An rsync signature.
SignatureOptions
Options for Signature::calculate.
SignatureParseError
Indicates that a signature was not valid.

Enums§

ApplyError
Indicates that a delta could not be applied because it was invalid.
DiffError
Indicates that a delta could not be calculated

Functions§

apply
Apply delta to the base data base, appending the result to out.
apply_limited
Apply delta to the base data base, writing the result to out. Errors if more than limit bytes would be written to out.
diff
Calculate a delta and write it to out. This delta can be applied to the base data represented by signature to attempt to reconstruct data.