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_ACORN_RISCOS ๐
- OS_AMIGA ๐
- OS_ATARI_TOS ๐
- OS_CPM ๐
- OS_FAT ๐
- OS_HPFS ๐
- OS_MACINTOSH ๐
- OS_NTFS ๐
- OS_QDOS ๐
- OS_TOPS20 ๐
- OS_UNIX ๐
- OS_UNKNOWN ๐
- OS_VMS ๐
- OS_VM_CMS ๐
- OS_Z_SYSTEM ๐
Functionsยง
- read_cstring ๐