abrasion/third_party/cargo/vendor/miniz_oxide-0.3.7
q3k 4a50bbf00d third_party/cargo: re-raze, fix winapi for windows 2021-05-03 23:43:36 +02:00
..
src third_party: bump everything 2021-01-07 23:38:16 +00:00
.cargo-checksum.json third_party: bump everything 2021-01-07 23:38:16 +00:00
BUILD.bazel third_party/cargo: re-raze, fix winapi for windows 2021-05-03 23:43:36 +02:00
Cargo.toml third_party: bump everything 2021-01-07 23:38:16 +00:00
LICENSE third_party: bump everything 2021-01-07 23:38:16 +00:00
Readme.md third_party: bump everything 2021-01-07 23:38:16 +00:00

Readme.md

miniz_oxide

A pure rust replacement for the miniz DEFLATE/zlib encoder/decoder. The main intention of this crate is to be used as a back-end for the flate2, 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.

Requires at least rust 1.34.

Usage

Simple compression/decompression:


extern crate miniz_oxide;

use miniz_oxide::inflate::decompress_to_vec;
use miniz_oxide::deflate::compress_to_vec;

fn roundtrip(data: &[u8]) {
    let compressed = compress_to_vec(data, 6);
    let decompressed = decompress_to_vec(decompressed.as_slice()).expect("Failed to decompress!");
}