Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
src/ | H | 03-May-2022 | - | 5,489 | 3,986 | |
.cargo-checksum.json | H A D | 03-May-2022 | 89 | 1 | 1 | |
.cargo_vcs_info.json | H A D | 01-Jan-1970 | 74 | 6 | 5 | |
Cargo.toml | H A D | 01-Jan-1970 | 1.6 KiB | 54 | 47 | |
Cargo.toml.orig-cargo | H A D | 01-Jan-1970 | 1.4 KiB | 38 | 32 | |
LICENSE | H A D | 01-Jan-1970 | 1 KiB | 22 | 17 | |
LICENSE-APACHE.md | H A D | 01-Jan-1970 | 9.9 KiB | 178 | 150 | |
LICENSE-MIT.md | H A D | 01-Jan-1970 | 1 KiB | 22 | 17 | |
LICENSE-ZLIB.md | H A D | 01-Jan-1970 | 835 | 12 | 6 | |
Readme.md | H A D | 01-Jan-1970 | 765 | 23 | 15 | |
build.rs | H A D | 01-Jan-1970 | 100 | 7 | 5 |
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