use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("Symbol is not part of existing mapping")]
SymbolNotFound,
#[error("Code already in use")]
CodeInUse,
#[error("Code is not valid for this decoding table")]
InvalidCode,
#[error("No data was provided to build the codebook")]
DataEmpty,
#[error("The binary encoding appears to be malformed")]
BinaryCoding(#[from] bincode::Error),
}