Crate miniz_oxide

Source
Expand description

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:


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

Modules§

deflate
This module contains functionality for compression.
inflate
This module contains functionality for decompression.

Structs§

StreamResult
A structure containg the result of a call to the inflate or deflate streaming functions.

Enums§

DataFormat
How compressed data is wrapped.
MZError
A list of miniz failed status codes.
MZFlush
A list of flush types.
MZStatus
A list of miniz successful status codes.

Type Aliases§

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