#[derive(Debug, thiserror::Error, PartialEq, Eq, PartialOrd, Ord)]
pub enum DecodeError {
#[error("invalid character: 0x{0:02x}")]
InvalidCharacter(u8),
#[error("invalid length for padded base-n input")]
InvalidLength,
#[error("buffer too small: {0} bytes")]
BufferTooSmall(usize),
#[error("input length too short for expected length")]
InputTooShort,
}
pub type Result<T, E = DecodeError> = std::result::Result<T, E>;