#compression #lzo #minilzo

absperf-minilzo

safe wrapper around absperf-minilzo-sys

6 releases

✓ Uses Rust 2018 edition

0.3.4 May 21, 2020
0.3.3 May 21, 2020
0.1.0 May 21, 2020

#71 in Compression

GPL-2.0 license

235KB
6.5K SLoC

BrightScript 6K SLoC // 0.0% comments Ruby HTML 274 SLoC // 0.1% comments

absperf-minilzo-sys

Unsafe wrappers around minilzo. This is a pretty simple rust-bindgen generated wrapper.

Why not the existing one?

That one doesn't actually cover the entire library, and it doesn't statically link the library. We could make those fixes upstream, but we need this library functioning ASAP.


lib.rs:

High-level safe wrappers around minilzo, backed by the absperf-minilzo-sys crate. This was created instead of using existing crates because the existing crates didn't export all of the necessary functions (notably the adler32 checksum one and the version strings), and the interfaces weren't as flexible as they could have been.

For the most part, to use this, just import [CompressInto] and [DecompressInto] and start using their methods on your byte slices. For decompression into a new [std::vec::Vec], make sure you read the documentation on the [DecompressInto] implementation for Vec<u8>.

Dependencies

~250–375KB