Skip to content

Binary diffing algorithm implemented in Rust

License

Notifications You must be signed in to change notification settings

TravisYeah/bsdiff-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bsdiff-rs

Build status Cargo Link

Rust port of a bsdiff library. High performance patching. All written in safe Rust.

Diffing

let old = std::fs::read("old")?;
let new = std::fs::read("new")?;
let mut patch = Vec::new();

bsdiff::diff(&old, &new, &mut patch)?;
// TODO: compress `patch` here
std::fs::write("patch", &patch)?;

Patching

let old = std::fs::read("old")?;
let patch = std::fs::read("patch")?;
// TODO: decompress `patch` here
let mut new = Vec::new();

bsdiff::patch(&old, &mut patch.as_slice(), &mut new)?;
std::fs::write("new", &new)?;

About

Binary diffing algorithm implemented in Rust

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%