gecko-dev/third_party/rust/miniz_oxide
Andreas Tolfsen f23e8c7f0e Bug 1439329 - Bump crate dependencies for zip 0.3. r=jgraham
Output from "./mach vendor rust":

	% ./mach vendor rust
	 0:01.15 rm -rf /Users/ato/src/gecko/third_party/rust
	      Adding adler32 v1.0.2
	      Adding build_const v0.2.0
	      Adding bzip2 v0.3.2
	      Adding bzip2-sys v0.1.6
	      Adding cc v1.0.4
	      Adding crc v1.7.0
	      Adding flate2 v1.0.1
	      Adding miniz_oxide v0.1.2
	      Adding miniz_oxide_c_api v0.1.2

MozReview-Commit-ID: EBVi4OdzYm3

--HG--
extra : rebase_source : b2f756574ebabc96b1378713a7ee6247274a388e
2018-02-19 12:33:08 +01:00
..
src
tests
.cargo-checksum.json
Cargo.toml
Readme.md

Readme.md

miniz_oxide

A pure rust replacement for the miniz DEFLATE/zlib encoder/decoder. The plan for this crate is to be used as a back-end for the flate2 crate and eventually remove the need to depend on a C library.

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!");
}

TODO: Advanced functions.