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