1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/// Length in bytes of the fixed RFC 1952 gzip member header.
pub const GZIP_HEADER_LEN: usize = 10;
/// Length in bytes of the RFC 1952 gzip member trailer (CRC32 + ISIZE).
pub const GZIP_TRAILER_LEN: usize = 8;
/// Default RFC 1952 gzip header matching `flate2::GzBuilder::new()`.
pub const GZIP_DEFAULT_HEADER: =
;
/// First RFC 1952 magic identification byte.
pub const GZIP_ID1: u8 = 0x1f;
/// Second RFC 1952 magic identification byte.
pub const GZIP_ID2: u8 = 0x8b;
/// RFC 1952 DEFLATE compression method identifier.
pub const GZIP_METHOD_DEFLATE: u8 = 8;
/// RFC 1952 header flag indicating a 16-bit header CRC is present.
pub const GZIP_FLAG_FHCRC: u8 = 1 << 1;
/// RFC 1952 header flag indicating an optional extra field is present.
pub const GZIP_FLAG_FEXTRA: u8 = 1 << 2;
/// RFC 1952 header flag indicating a NUL-terminated original filename is present.
pub const GZIP_FLAG_FNAME: u8 = 1 << 3;
/// RFC 1952 header flag indicating a NUL-terminated comment is present.
pub const GZIP_FLAG_FCOMMENT: u8 = 1 << 4;
/// Mask of reserved RFC 1952 header flag bits that must be zero.
pub const GZIP_FLAG_RESERVED: u8 = | | ;
/// Maximum ratio of trusted trailer ISIZE hint relative to compressed input length.
pub const GZIP_HINT_MAX_RATIO: usize = 256;
/// Maximum direct preallocation size trusted from the trailer ISIZE hint when `buffer_size` is smaller.
pub const GZIP_HINT_DIRECT_CAP: usize = 65_536;
/// Extra headroom added to a trusted trailer ISIZE hint to avoid a final reallocation on `StreamEnd`.
pub const GZIP_HINT_HEADROOM: usize = 16;
/// Minimum fallback preallocation capacity when no trusted trailer ISIZE hint is available.
pub const GZIP_FALLBACK_RESERVE: usize = 4096;