Crate lzf [] [src]

lzf-rs is a small wrapper around LibLZF, a very small data compression library.

The compression algorithm is very, very fast, yet still written in portable C.

This Rust library is a wrapper around the library from Marc Lehmann.

Basic Operation

#![allow(unstable)]
let data = "foobar";

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

let decompressed = lzf::decompress(compressed.as_slice(), 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. The return value will be set to the error if compression fails.

Type Definitions

LzfResult