Skip to main content

msrtc_rans/
lib.rs

1// Licensed under the MIT license.
2// Author: Riaan de Beer - github.com/infinityabundance - rdebeer.infinityabundance@gmail.com
3// Derived from Microsoft MLVC msrtc_rans (MIT)
4// See NOTICE file for attribution.
5
6//! # msrtc-rans
7//!
8//! Safe public Rust entropy-coder API for msrtc_rans.
9//!
10//! This crate provides the public API for the rANS entropy coder,
11//! including entropy encoder/decoder, streams, and distribution
12//! construction.
13
14#![forbid(unsafe_code)]
15#![deny(missing_docs)]
16
17extern crate alloc;
18
19/// Re-export the core rANS primitives.
20pub use msrtc_rans_core::*;
21
22/// Entropy encoder/decoder (high-level PMF/bypass/CDF pipeline).
23pub mod entropy;
24
25/// Resizable buffer layer — `IResizableBuffer` / `HeapResizableBuffer`.
26pub mod buffer;
27
28/// rANS stream types — `RansEncoderStream` / `RansDecoderStream`.
29pub mod stream;
30
31/// Deterministic hardening/property tests (Phase 8) — compiled for tests only.
32#[cfg(test)]
33pub mod hardening;
34
35/// Re-export the stream types at the crate root.
36pub use stream::{RansDecoderStream, RansEncoderStream, RansVariant};