зеркало из https://github.com/mozilla/gecko-dev.git
f23e8c7f0e
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 |
||
---|---|---|
.. | ||
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.