The crate is started as a port of the C++ lzokay library.
LZO compresses a block of data into matches (a sliding dictionary) and runs of non-matching literals to produce good results on highly redundant data
— Wikipedia
There is no publicly available documentation of the LZO format. A good introduction is available in the Linux Kernel documentation
The crate is no_std. Decompression works without any allocation.
For compression, a [Dict] instance is needed.
Examples
use ;
let input = b"hello world";
// You should reuse the dictionary across calls.
let mut dict = new;
let mut compressed = vec!;
let n = compress.unwrap;
compressed.truncate;
let mut output = vec!;
let m = decompress.unwrap;
assert_eq!;