Expand description

The encoder and decoder of the GZIP format.

The GZIP format is defined in RFC-1952.

Examples

use std::io::{self, Read};
use libflate::gzip::{Encoder, Decoder};

// Encoding
let mut encoder = Encoder::new(Vec::new()).unwrap();
io::copy(&mut &b"Hello World!"[..], &mut encoder).unwrap();
let encoded_data = encoder.finish().into_result().unwrap();

// Decoding
let mut decoder = Decoder::new(&encoded_data[..]).unwrap();
let mut decoded_data = Vec::new();
decoder.read_to_end(&mut decoded_data).unwrap();

assert_eq!(decoded_data, b"Hello World!");

Structs

GZIP decoder.

Options for a GZIP encoder.

GZIP encoder.

Extra field of a GZIP header.

A sub field in the extra field of a GZIP header.

GZIP Header.

GZIP header builder.

A decoder that decodes all members in a GZIP stream.

Trailer 🔒

Enums

Compression levels defined by the GZIP format.

OS type.

Constants

F_COMMENT 🔒
F_EXTRA 🔒
F_HCRC 🔒
F_NAME 🔒
F_TEXT 🔒
GZIP_ID 🔒
OS_AMIGA 🔒
OS_CPM 🔒
OS_FAT 🔒
OS_HPFS 🔒
OS_NTFS 🔒
OS_QDOS 🔒
OS_TOPS20 🔒
OS_UNIX 🔒
OS_UNKNOWN 🔒
OS_VMS 🔒
OS_VM_CMS 🔒

Functions