flate2
A streaming compression/decompression library for Rust. The underlying
implementation by default uses miniz
but
can optionally be configured to use the system zlib, if available.
There is also an experimental rust backend that uses the
miniz_oxide
crate. This avoids the need
to build C code, but hasn't gone through as much testing as the other backends.
Supported formats:
- deflate
- zlib
- gzip
# Cargo.toml
[]
= "1.0"
Using zlib instead of miniz:
[]
= { = "1.0", = ["zlib"], = false }
Using the rust back-end:
[]
= { = "1.0", = ["rust_backend"], = false }
Compression
extern crate flate2;
use *;
use Compression;
use ZlibEncoder;
Decompression
extern crate flate2;
use *;
use GzDecoder;
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.