• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

src/H03-May-2022-5,4893,986

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D01-Jan-197074 65

Cargo.tomlH A D01-Jan-19701.6 KiB5447

Cargo.toml.orig-cargoH A D01-Jan-19701.4 KiB3832

LICENSEH A D01-Jan-19701 KiB2217

LICENSE-APACHE.mdH A D01-Jan-19709.9 KiB178150

LICENSE-MIT.mdH A D01-Jan-19701 KiB2217

LICENSE-ZLIB.mdH A D01-Jan-1970835 126

Readme.mdH A D01-Jan-1970765 2315

build.rsH A D01-Jan-1970100 75

Readme.md

1# miniz_oxide
2
3A pure rust replacement for the [miniz](https://github.com/richgel999/miniz) DEFLATE/zlib encoder/decoder.
4The main intention of this crate is to be used as a back-end for the [flate2](https://github.com/alexcrichton/flate2-rs), but it can also be used on it's own. Using flate2 with the ```rust_backend``` feature provides an easy to use streaming API for miniz_oxide.
5
6Requires at least rust 1.34.
7
8## Usage
9Simple compression/decompression:
10```rust
11
12extern crate miniz_oxide;
13
14use miniz_oxide::inflate::decompress_to_vec;
15use miniz_oxide::deflate::compress_to_vec;
16
17fn roundtrip(data: &[u8]) {
18    let compressed = compress_to_vec(data, 6);
19    let decompressed = decompress_to_vec(decompressed.as_slice()).expect("Failed to decompress!");
20}
21
22```
23