#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error("decoded output would exceed the {limit}-byte limit")]
OutputTooLarge {
limit: usize,
},
#[error("run-length stream decodes to {size} bytes, at or over the 20 MiB limit")]
RunLengthTooLarge {
size: u64,
},
#[error("LZW stream is malformed: {0}")]
LzwMalformed(&'static str),
#[error("predictor parameters are invalid: {0}")]
BadPredictorParams(&'static str),
#[error("size computation overflowed")]
SizeOverflow,
#[error("CCITT parameters are out of range: {0}")]
BadCcittParams(&'static str),
}