Fast and memory saving bsdiff 4.x compatible delta compressor and patcher.
Add dependency to Cargo.toml
under your project:
toml
[dependencies]
qbsdiff = "1.1"
The commands qbsdiff
and qbspatch
could be compiled with:
shell
$ cargo build --release --bins --features cmd
$ target/release/qbsdiff -h
$ target/release/qbspatch -h
Apply patch to source and produce the target data: ```rust use std::io; use qbsdiff::Bspatch;
fn bspatch(source: &[u8], patch: &[u8]) -> io::Result
Compare source with target then generate patch: ```rust use std::io; use qbsdiff::Bsdiff;
fn bsdiff(source: &[u8], target: &[u8]) -> io::Result
Note that qbsdiff
would not generate exactly the same patch file as bsdiff
.
Only the patch file format is promised to be compatible.