Crate lzf [] [src]

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 = "foobar";

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

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

Enums

LzfError

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 Definitions

LzfResult