Skip to content

Rust equivalent of rdiff C implementation. File diffing algorithm uses rsync rolling checksum (as a weak hash) and Blake2b (as a strong hash). rdiff-rust could be used to efficiently send file updates to a remote location by saving throughput.

Notifications You must be signed in to change notification settings

TomaszAugustyn/rdiff-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rdiff implementation in Rust

Rust equivalent of rdiff C implementation. File diffing algorithm uses rsync rolling checksum (as a weak hash) and Blake2b (as a strong hash). Weak hash needs to be fast and inexpensive (higher random collision probability but low enough to be effective at quickly filtering out false-positives without too many collisions) and strong hash - a more expensive one but with a very low random collision probability.

rdiff-rust could be used to efficiently send file updates to a remote location by saving throughput. It is due to the fact that instead of sending whole files, signature and delta files are exchanged between client and server.

Currently signature and delta part is implemented. Patching - not yet.

Building

# Clone repo
git clone https://github.com/TomaszAugustyn/rdiff-rust.git
cd rdiff-rust

# Build with cargo
cargo build

cd target/debug/

# Generate signature file from unchanged (old) file
./rdiff-rust signature /tmp/old /tmp/signature

# Generate delta file from signature file and changed (new) file
./rdiff-rust delta /tmp/signature /tmp/new /tmp/delta

Tests

cargo test

About

Rust equivalent of rdiff C implementation. File diffing algorithm uses rsync rolling checksum (as a weak hash) and Blake2b (as a strong hash). rdiff-rust could be used to efficiently send file updates to a remote location by saving throughput.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages