This library is a rust binding for the zstd compression library.
1 - Add to
# Cargo.toml  = "0.5"
2 - Usage
This library provides
Write wrappers to handle (de)compression,
along with convenience functions to made common tasks easier.
stream::copy_decode are easy-to-use
std::io::copy. Check the stream example:
extern crate zstd; use io; // This function use the convenient `copy_encode` method // This function does the same thing, directly using an `Encoder`:
You can use this library to wrap non-blocking writer/readers:
tokio feature, and
Compile it yourself
zstd is included as a submodule. To get everything during your clone, use:
git clone https://github.com/gyscos/zstd-rs --recursive
Or, if you cloned it without the
call this from inside the repository:
git submodule update --init
cargo build should take care
of building the C library and linking to it.
This library includes a pre-generated
You can also generate new bindings at build-time, using the
cargo build --features bindgen
- Benchmarks, optimizations, ...
This implementation is largely inspired by bozaro's lz4-rs.
- The zstd C library is under a dual BSD/GPLv2 license.
- This zstd-rs binding library is under a MIT license.