arithmetic_coding/lib.rs
1//! Arithmetic coding library
2
3#![deny(missing_docs, missing_debug_implementations)]
4
5pub use arithmetic_coding_core::{fixed_length, max_length, one_shot, BitStore, Model};
6
7mod common;
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<E> {
17 /// Io error when reading/writing bits from a stream
18 Io(#[from] std::io::Error),
19
20 /// Invalid symbol
21 ValueError(E),
22}