Skip to main content

lzcomplexity_core/
lib.rs

1//! lzcomplexity-core — LZ76 factorization and related complexity measures.
2//!
3//! This crate is a Rust port of the C++ `lzcomplexity` library. It contains
4//! the algorithm implementations, independent of any Python bindings.
5
6pub mod lpf;
7pub mod lz76;
8pub mod metrics;
9pub mod sequence;
10pub mod shuffle;
11pub mod suffix_array;
12
13pub use lz76::{LempelZiv, Lz76Result, LzArgs, LzExtra, LzShuffle};
14pub use sequence::Sequence;
15pub use suffix_array::{build_suffix_array, SuffixArray};
16
17/// Sentinel value used in `LzArgs` to indicate "auto-detect from sequence".
18pub const NO_ALPHABET: u32 = u32::MAX;
19
20/// Default minimum alphabet size, mirroring `details::ALPHABET_SIZE` from the C++.
21pub const ALPHABET_SIZE: u32 = 2;