use thiserror::Error;
#[derive(Error, Debug, Copy, Clone, Eq, PartialEq)]
pub(crate) enum SharedBrotliError {
#[error("Quality level {quality} does not implement large window Brotli")]
UnsupportedLargeWindow {
quality: usize,
},
#[error("A prepared dictionary holds at most {limit} attachments, not {attached}")]
TooManyPrefixDictionaries {
attached: usize,
limit: usize,
},
#[error("A shared dictionary of {bytes} bytes exceeds the limit of {limit}")]
DictionaryTooLarge {
bytes: u64,
limit: u64,
},
#[error("Preparing a dictionary would allocate {bytes} bytes, past the limit of {limit}")]
SharedContextTooLarge {
bytes: u64,
limit: u64,
},
}