mod decode;
mod encode;
mod table;
#[cfg(test)]
mod tests;
pub(crate) use decode::decode;
pub(crate) use encode::encode;
use table::TABLE;
#[derive(Debug, thiserror::Error, PartialEq, Eq, Clone, Copy)]
pub enum HuffmanError {
#[error("EOS symbol encountered in encoded data")]
EosInStream,
#[error("invalid padding (not all ones)")]
InvalidPadding,
#[error("padding too long (more than 7 bits)")]
PaddingTooLong,
}