arithmetic_coding_adder_dep/lib.rs
1//! Arithmetic coding library
2
3#![deny(missing_docs, clippy::all, missing_debug_implementations)]
4#![warn(clippy::pedantic)]
5
6pub use arithmetic_coding_core_adder_dep::{fixed_length, max_length, one_shot, BitStore, Model};
7
8pub mod decoder;
9pub mod encoder;
10
11pub use decoder::Decoder;
12pub use encoder::Encoder;
13
14/// Errors that can occur during encoding/decoding
15#[derive(Debug, thiserror::Error)]
16pub enum Error {
17 /// Io error when reading/writing bits from a stream
18 #[error("io error")]
19 Io(#[from] std::io::Error),
20
21 /// Invalid symbol
22 #[error("invalid symbol")]
23 ValueError,
24}