pub enum Jb2Error {
Truncated,
BadHeaderFlag,
InheritedDictTooLarge,
MissingSharedDict,
ImageTooLarge,
EmptyDictReference,
InvalidSymbolIndex,
UnknownRecordType,
UnexpectedDictRecordType,
ZpInitFailed,
TooManyRecords,
}Expand description
JB2 bitonal image decoding errors.
Variants§
Truncated
Input ended before the JB2 stream was complete.
BadHeaderFlag
A flag bit in the image/dict header was set when it must be zero.
InheritedDictTooLarge
The inherited dictionary length exceeds the shared dictionary size.
The stream references a shared dictionary but none was provided.
ImageTooLarge
Image dimensions exceed the safety limit (~64M pixels).
EmptyDictReference
A record references a dictionary symbol but the dictionary is empty.
InvalidSymbolIndex
A decoded symbol index is out of range for the current dictionary.
UnknownRecordType
An unrecognized record type was encountered in the image stream.
UnexpectedDictRecordType
An unexpected record type was encountered in a dictionary stream.
ZpInitFailed
The ZP arithmetic coder could not be initialized (insufficient input).
TooManyRecords
Stream contains more records than the safety limit allows.
Trait Implementations§
Source§impl Error for Jb2Error
impl Error for Jb2Error
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()