[][src]Module compress::zlib

ZLIB Compression and Decompression. Requires zlib feature, enabled by default

This module contains an implementation of the ZLIB compression scheme. This compression format is based on an underlying DEFLATE-encoded stream.

Example

This example is not tested
use compress::zlib;
use std::fs::File;
use std::path::Path;
use std::io::Read;

let stream = File::open(&Path::new("path/to/file.zlib")).unwrap();
let mut decompressed = Vec::new();
zlib::Decoder::new(stream).read_to_end(&mut decompressed);

Related links

  • http://tools.ietf.org/html/rfc1950 - RFC that this implementation is based on

Structs

Decoder

Structure used to decode a ZLIB-encoded stream. The wrapped stream can be re-acquired through the unwrap() method.