pub enum InflateError {
Truncated,
InvalidBlockType,
InvalidCode,
InvalidCodeLengths,
DistanceTooFar,
LengthMismatch,
OutputTooLarge,
InvalidHeader,
ChecksumMismatch,
TrailingData,
}Expand description
Everything that can be wrong with a DEFLATE, zlib or gzip stream. The framing errors live here too so the three decoders share one type.
Variants§
Truncated
The stream ended before the final block did.
InvalidBlockType
A block header used the reserved BTYPE=11 (RFC 1951 §3.2.3).
InvalidCode
A Huffman code set was over-subscribed or incomplete, or a code decoded to a symbol the format reserves (286, 287, 30, 31).
InvalidCodeLengths
The dynamic block header described its code lengths wrongly: a repeat with nothing to repeat, or one that runs past the end of the table.
DistanceTooFar
A back-reference pointed before the start of the output.
LengthMismatch
A stored block’s LEN and NLEN disagree, or a gzip member’s ISIZE does not match what was inflated.
OutputTooLarge
The output exceeded the caller’s limit.
InvalidHeader
A zlib or gzip header is malformed or asks for something unsupported (a preset dictionary, a compression method other than DEFLATE).
ChecksumMismatch
The CRC-32 or Adler-32 trailer does not match the inflated data.
TrailingData
Bytes followed the end of the stream.
Trait Implementations§
Source§impl Clone for InflateError
impl Clone for InflateError
Source§fn clone(&self) -> InflateError
fn clone(&self) -> InflateError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for InflateError
Source§impl Debug for InflateError
impl Debug for InflateError
Source§impl Display for InflateError
impl Display for InflateError
impl Eq for InflateError
Source§impl Error for InflateError
impl Error for InflateError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()