Formats and levels v0.1.0
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.
Cases
| Name | Value | Description |
|---|---|---|
Raw | 0 | A bare Deflate stream, RFC 1951, with no header and no checksum. |
Zlib | 1 | The zlib format, RFC 1950: a two-byte header, the stream, and an Adler-32 of the data. |
Gzip | 2 | The 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.
Cases
| Name | Value | Description |
|---|---|---|
Store | 0 | No compression: the data is stored as it is, in blocks a decompressor copies straight out. |
Fastest | 1 | The quickest search: the first match found is taken. |
Default | 2 | A balance of speed and size, close to zlib's default. |
Best | 3 | The most thorough search this package does. |