Crate miniz_oxide

source ·
Expand description

A pure rust replacement for the miniz DEFLATE/zlib encoder/decoder. Used a rust back-end for the flate2 crate.

§Usage

§Simple compression/decompression:


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(compressed.as_slice()).expect("Failed to decompress!");
}

Re-exports§

  • pub use crate::shared::update_adler32 as mz_adler32_oxide;
  • pub use crate::shared::MZ_ADLER32_INIT;
  • pub use crate::shared::MZ_DEFAULT_WINDOW_BITS;

Modules§

  • This module contains functionality for compression.
  • This module contains functionality for decompression.
  • shared 🔒

Structs§

  • A structure containing the result of a call to the inflate or deflate streaming functions.

Enums§

  • How compressed data is wrapped.
  • A list of miniz failed status codes.
  • A list of flush types.
  • A list of miniz successful status codes.

Type Aliases§

  • Result alias for all miniz status codes both successful and failed.