arithmetic_coding_adder_dep/
lib.rs

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