Crate lzf

Source
Expand description

lzf is a very small data compression library.

Originally written as LibLZF by Marc Lehmann in portable C.

This Rust library is a rewrite of the original C code and fully compatible with compressed data from the C code (and vice versa).

§Basic Operation

let data = "aaaaaaaaa";

let compressed = lzf::compress(data.as_bytes()).unwrap();

let decompressed = lzf::decompress(&compressed, data.len()).unwrap();

Enums§

LzfError
Errors that can occur during Compression or Decompression.

Functions§

compress
Compress the given data, if possible. The return value will be set to the error if compression fails.
decompress
Decompress the given data, if possible. An error will be returned if decompression fails.

Type Aliases§

LzfResult
A Result providing the underlying data or a compression/decompression error