gecko-dev/third_party/rust/miniz_oxide
Mike Hommey b19f6f43a2 Bug 1716518 - Upgrade miniz_oxide to v0.4.4 and adler to v1.0.2. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117751
2021-06-15 20:39:44 +00:00
..
src Bug 1716518 - Upgrade miniz_oxide to v0.4.4 and adler to v1.0.2. r=emilio 2021-06-15 20:39:44 +00:00
.cargo-checksum.json Bug 1716518 - Upgrade miniz_oxide to v0.4.4 and adler to v1.0.2. r=emilio 2021-06-15 20:39:44 +00:00
Cargo.toml Bug 1716518 - Upgrade miniz_oxide to v0.4.4 and adler to v1.0.2. r=emilio 2021-06-15 20:39:44 +00:00
LICENSE
LICENSE-APACHE.md Bug 1675534 - Bump glean-core to 33.3.0. r=chutten 2020-11-12 15:51:33 +00:00
LICENSE-MIT.md Bug 1675534 - Bump glean-core to 33.3.0. r=chutten 2020-11-12 15:51:33 +00:00
LICENSE-ZLIB.md Bug 1675534 - Bump glean-core to 33.3.0. r=chutten 2020-11-12 15:51:33 +00:00
Readme.md Bug 1675534 - Bump glean-core to 33.3.0. r=chutten 2020-11-12 15:51:33 +00:00
build.rs Bug 1622846 - Update BlendFactor API in WebGPU r=webidl,jimb,smaug 2021-04-22 19:18:49 +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!");
}