aehobak
Aehobak transcodes binary patches from bsdiff.
The goal is a byte-oriented format, compact and optimised for patch application speed.
As compression efficiency is content-dependent, one should verify with a suitable corpus.
The following results are for LZ4-compressed bsdiff patches of build artifacts that are under 3% of the target object size. The bench example can report the same metrics for provided files.
LZ4-compressed aehobak patches yield a median reduction of 50.8%.
Uncompressed aehobak patches yield a median reduction of:
- 38.1% over LZ4-compressed bsdiff patches
- 98.9% over uncompressed bsdiff patches
Direct application of aehobak patches can achieve 70% of memcpy speed, while panic-free except for out-of-memory.
Usage
let old = vec!;
let new = vec!;
let mut patch = Vecnew;
let mut encoded = Vecnew;
diff.unwrap;
encode.unwrap;
let mut decoded = Vecwith_capacity;
let mut patched = Vecwith_capacity;
decode.unwrap;
patch.unwrap;
assert_eq!;
Diffing Files
Patching Files