Skip to main content

sirocco/
format.rs

1//! The container formats around a DEFLATE stream.
2
3/// Which wrapper, if any, goes around the DEFLATE stream.
4#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
5#[non_exhaustive]
6pub enum Format {
7    /// A raw DEFLATE stream (RFC 1951), with no header or checksum.
8    Deflate,
9    /// A zlib stream (RFC 1950): a 2-byte header, DEFLATE, and an Adler-32
10    /// checksum. Streams that need a preset dictionary are rejected with
11    /// [`PresetDictionary`](crate::inflate::Error::PresetDictionary).
12    Zlib,
13    /// A gzip member (RFC 1952): a header, DEFLATE, a CRC-32 and the
14    /// uncompressed size.
15    Gzip,
16}