Fast and memory saving bsdiff 4.x compatible delta compressor and patcher.
Add dependency to Cargo.toml
:
toml
[dependencies]
qbsdiff = "1.3"
Build qbsdiff
and qbspatch
commands:
shell
$ cargo build --release --bins --features cmd
$ cd target/release
$ ./qbsdiff --help
$ ./qbspatch --help
Install commands to $CARGO_HOME/bin
:
shell
$ cargo install qbsdiff --features cmd
Produce the target stream by applying patch
to source
:
```rust
use std::io;
use qbsdiff::Bspatch;
fn bspatch(source: &[u8], patch: &[u8]) -> io::Result
Produce the patch data by comparing source
with target
:
```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.