pub enum InflateError {
UnexpectedEof,
InvalidBlockType,
StoredLengthMismatch {
length: u16,
complement: u16,
},
TooManyCodes {
table: HuffmanTable,
count: usize,
},
OversubscribedCode(HuffmanTable),
IncompleteCode(HuffmanTable),
MissingEndOfBlock,
RepeatWithoutPrevious,
CodeLengthOverflow,
InvalidCode(HuffmanTable),
DistanceTooFarBack {
distance: usize,
available: usize,
},
OutputLimitExceeded {
limit: usize,
},
}Expand description
An error found while decompressing a DEFLATE stream.
Variants§
UnexpectedEof
The input ended before the final block was complete.
InvalidBlockType
A block header used the reserved block type 3.
StoredLengthMismatch
A stored block’s length disagrees with its one’s complement copy.
TooManyCodes
A dynamic block declared more codes than the alphabet has symbols.
OversubscribedCode(HuffmanTable)
The code lengths of an alphabet over-subscribe the code space.
IncompleteCode(HuffmanTable)
The code lengths of an alphabet leave part of the code space unused, which DEFLATE only permits for a single one-bit code.
MissingEndOfBlock
A dynamic block gave the end-of-block symbol no code.
RepeatWithoutPrevious
A “repeat previous length” instruction came before any length.
CodeLengthOverflow
A run of code lengths extends past the declared number of codes.
InvalidCode(HuffmanTable)
The input holds a bit pattern that is no valid code, or one of the reserved symbols (literal/length 286–287, distance 30–31).
DistanceTooFarBack
A back-reference points before the start of the output.
Fields
OutputLimitExceeded
The decompressed data would exceed the caller’s size limit.
Trait Implementations§
Source§impl Clone for InflateError
impl Clone for InflateError
impl 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()