Formats and levels v0.1.0

Source
The raw, zlib and gzip formats, and the compression levels.

Format

pub enum Format: uint8 {
    Raw = 0,
    Zlib = 1,
    Gzip = 2
}

The container around a Deflate stream. Copy.

Source

Cases

NameValueDescription
Raw0A bare Deflate stream, RFC 1951, with no header and no checksum.
Zlib1The zlib format, RFC 1950: a two-byte header, the stream, and an Adler-32 of the data.
Gzip2The gzip format, RFC 1952: a header that may name the file, the stream, a CRC-32 of the data and its length.

Level

pub enum Level: uint8 {
    Store = 0,
    Fastest = 1,
    Default = 2,
    Best = 3
}

How hard the compressor looks for repeated data. Copy. Higher levels find longer and more matches and so write less, and take longer to.

Source

Cases

NameValueDescription
Store0No compression: the data is stored as it is, in blocks a decompressor copies straight out.
Fastest1The quickest search: the first match found is taken.
Default2A balance of speed and size, close to zlib's default.
Best3The most thorough search this package does.