Expand description
Public spec-first API reexports. Public, spec-first infotheory API surface.
Re-exports§
pub use crate::prediction::OnlineBytePredictor;pub use crate::spec::AssetRef;pub use crate::spec::CanonicalBytes;pub use crate::spec::CanonicalJson;pub use crate::spec::CompiledCompressionBackend;pub use crate::spec::CompiledRateBackend;pub use crate::spec::CompressionBackendCapabilities;pub use crate::spec::MethodBackendFamily;pub use crate::spec::RateBackendCapabilities;pub use crate::spec::RateBackendTraceStrategy;pub use crate::spec::SpecEnvironment;pub use crate::spec::ValidatedCompressionBackend;pub use crate::spec::ValidatedRateBackend;
Structs§
- Binary
Prediction - Probability pair for the next binary symbol.
- Byte
Prefix Mass - Live byte-prefix state used to query a 256-way byte PDF as conditional bits.
- Calibrated
Spec - Configuration for an SSE-calibrated wrapper rate backend.
- Compression
Path Batch Options - Options for backend-first path compression-size operations.
- Generation
Config - Generation options shared by the library API and CLI.
- Infotheory
Ctx - Reusable execution context holding default rate and compression backends.
- Mixture
Expert Spec - Expert specification for mixture backends.
- Mixture
Spec - Mixture specification for rate-backend mixtures.
- NcdCompute
Options - NCD compute options (operation-level parallelism only).
- Particle
Spec - Configuration for a particle-latent filter ensemble rate backend.
- Rate
Backend BitSession - Stateful bit-level session over a rate backend.
- Rate
Backend BitSession Checkpoint - Opaque checkpoint for restoring a
RateBackendBitSession. - Rate
Backend Session - Stateful rate-backend session for fitting, conditioning, and continuation.
Enums§
- BitOrder
- Bit ordering used when factorizing byte symbols.
- BitStream
Semantics - Semantic interpretation of a bit stream.
- Calibration
Context Kind - Fixed context families for calibrated PDF wrappers.
- Compression
Backend - Compression backend used by NCD/compression-size operations.
- Generation
Strategy - How to pick the next byte from the model distribution.
- Generation
Update Mode - How generated symbols should update the model state.
- Mixture
Kind - Mixture policy kind for rate-backend mixtures.
- Mixture
Schedule Mode - Adaptive schedule family for switching and convex mixtures.
- NcdVariant
- Normalized compression-distance formula variant.
- Operation
Parallelism - Per-call control over operation-level parallelism.
- Rate
Backend - Core predictive model class used by the library.
- Zpaq
Method Spec - Typed ZPAQ method specification.
Constants§
- MAX_
MIXTURE_ NESTING - Shared maximum nesting depth for recursive mixture specifications.
Traits§
- Online
BitPredictor - Minimal bit predictor interface for true binary consumers.
Functions§
- d_
kl_ bytes - KL divergence
D_KL(P || Q)between the byte histograms ofxandy(bits). - empirical_
cross_ entropy_ bytes - Empirical (zero-order, IID) cross-entropy
H₀_q(p) = -Σ p(x) log₂ q(x)between the byte histograms oftest_data(treated asp) andtrain_data(treated asq). - empirical_
entropy_ bytes - Empirical (zero-order, IID) Shannon entropy
H₀(X)in bits/symbol. - empirical_
joint_ entropy_ bytes - Empirical (zero-order, IID) joint Shannon entropy
H₀(X,Y)over aligned prefixes. - empirical_
mutual_ information_ bytes - Empirical (zero-order, IID) mutual information
I₀(X;Y)from byte histograms. - empirical_
ned_ bytes - Empirical (zero-order, IID) normalized entropy distance:
(H₀(X,Y) - min(H₀(X), H₀(Y))) / max(H₀(X), H₀(Y)). - empirical_
ned_ cons_ bytes - Empirical (zero-order, IID) constructive normalized entropy distance:
(H₀(X,Y) - min(H₀(X), H₀(Y))) / H₀(X,Y). - empirical_
nte_ bytes - Empirical (zero-order, IID) NTE estimate using variation of information
normalized by
max(H₀(X), H₀(Y)). - empirical_
resistance_ to_ transformation_ bytes - Empirical (zero-order, IID) resistance-to-transformation estimate:
I₀(X; T(X)) / H₀(X)fortx = T(x). - get_
default_ ctx - Returns the current default information theory context for this thread.
- js_
div_ bytes - Jensen-Shannon divergence between the byte histograms of
xandy(bits). - nhd_
bytes - Normalized Hellinger distance between the byte distributions of
xandy. - parse_
mixture_ kind_ name - Parse a mixture kind name with the shared alias table used across CLI, Python, and WASM.
- parse_
mixture_ schedule_ name - Parse a mixture schedule mode with the shared alias table used across CLI, Python, and WASM.
- set_
default_ ctx - Sets the current default information theory context for this thread.
- try_
biased_ entropy_ rate_ backend - Fallible biased/plugin entropy rate of
datausing the explicit ratebackend. - try_
biased_ entropy_ rate_ bytes - Fallible biased/plugin entropy-rate estimate using the default context backend.
- try_
compress_ bytes_ backend - Compress
datawithbackendand return encoded bytes. - try_
compress_ size_ backend - Compute compressed size (bytes) for
datausingbackend. - try_
compress_ size_ chain_ backend - Compute compressed size (bytes) for a logical concatenation of
partsusingbackend. - try_
conditional_ entropy_ bytes - Fallible conditional entropy estimate using the default context rate backend.
- try_
conditional_ entropy_ paths - Compute conditional entropy estimate
H(X|Y)for two files using the default rate backend. - try_
conditional_ entropy_ rate_ bytes - Fallible conditional entropy-rate estimate
H(X|Y)with the default context backend. - try_
cross_ entropy_ bytes - Fallible cross-entropy estimate
H_train(test)using the default context rate backend. - try_
cross_ entropy_ paths - Compute cross-entropy estimate
H_train(test)for two files using the default rate backend. - try_
cross_ entropy_ rate_ backend - Fallible cross-entropy
H_{train}(test)— scoretest_dataunder a model trained ontrain_data. - try_
cross_ entropy_ rate_ bytes - Fallible cross-entropy rate estimate with the default context backend.
- try_
decompress_ bytes_ backend - Decompress
inputwithbackendand return decoded bytes. - try_
entropy_ rate_ backend - Fallible entropy-rate estimate of
datausing the explicit ratebackend. - try_
entropy_ rate_ bytes - Fallible entropy-rate estimate
Ĥ(X)(bits per symbol) using the default context backend. - try_
generate_ bytes - Generate a continuation from
promptusing the current default context andGenerationConfig::default(). - try_
generate_ bytes_ conditional_ chain - Generate a continuation after conditioning on an explicit chain of prefix parts
using the current default context and
GenerationConfig::default(). - try_
generate_ bytes_ conditional_ chain_ with_ config - Generate a continuation after conditioning on an explicit chain of prefix parts using the current default context.
- try_
generate_ bytes_ with_ config - Generate a continuation from
promptusing the current default context. - try_
get_ bytes_ from_ paths - Read all files in
pathsin parallel and return their contents. - try_
get_ compressed_ size_ path_ backend - Read
pathand return its compressed size (bytes) usingbackend. - try_
get_ compressed_ sizes_ from_ paths_ backend - Compute compressed sizes for
pathsusingbackend. - try_
get_ compressed_ sizes_ from_ paths_ backend_ with_ options - Compute compressed sizes for
pathsusingbackendwith explicit operation-level parallelism controls. - try_
intrinsic_ dependence_ bytes - Fallible intrinsic dependence estimate:
(H₀(X) - Ĥ(X)) / H₀(X), whereH₀is the order-0 / empirical entropy andĤis the entropy rate produced by the default context’s rate backend. - try_
joint_ entropy_ rate_ backend - Fallible joint entropy rate
H(X,Y)using an explicitbackend. - try_
joint_ entropy_ rate_ bytes - Fallible joint entropy-rate estimate
H(X,Y)with the default context backend. - try_
js_ divergence_ paths - Compute Jensen-Shannon divergence between the byte histograms of two files.
- try_
kl_ divergence_ paths - Compute KL divergence between the byte histograms of two files.
- try_
mutual_ information_ bytes - Fallible mutual-information estimate
I(X;Y)using the default context rate backend. - try_
mutual_ information_ paths - Compute mutual information estimate for two files using the default rate backend.
- try_
mutual_ information_ rate_ backend - Mutual information rate estimate under an explicit
backend. - try_
mutual_ information_ rate_ bytes - Fallible mutual-information rate estimate with the default context backend.
- try_
ncd_ bytes_ backend - Compute NCD for byte slices with an explicit compression backend.
- try_
ncd_ bytes_ backend_ with_ options - Compute NCD for byte slices with an explicit compression backend and explicit operation-level parallelism controls.
- try_
ncd_ bytes_ default - Compute NCD for byte slices using the thread-local default context.
- try_
ncd_ matrix_ bytes_ backend - Compute an
n x npairwise NCD matrix (row-major) with an explicit compression backend. - try_
ncd_ matrix_ bytes_ backend_ with_ options - Compute an
n x npairwise NCD matrix with explicit operation-level parallelism controls. - try_
ncd_ matrix_ bytes_ default - Compute an
n x npairwise NCD matrix (row-major) using the thread-local default context. - try_
ncd_ matrix_ paths_ backend - Compute an
n x npairwise NCD matrix (row-major) for file paths with an explicit compiled compression backend. - try_
ncd_ matrix_ paths_ backend_ with_ options - Compute an
n x npairwise NCD matrix (row-major) for file paths with an explicit compiled compression backend and operation-level parallelism controls. - try_
ncd_ paths_ backend - Compute NCD for two files with an explicit compression backend.
- try_
ncd_ paths_ compiled_ backend - Compute NCD for two files with an explicit compiled compression backend.
- try_
ncd_ paths_ compiled_ backend_ with_ options - Compute NCD for two files with an explicit compiled compression backend and explicit operation-level parallelism controls.
- try_
ned_ bytes - Fallible normalized entropy distance (NED) estimate with the default context backend.
- try_
ned_ cons_ bytes - Fallible constructive NED estimate with the default context backend.
- try_
ned_ cons_ rate_ bytes - Fallible entropy-rate constructive NED estimate with the default context backend.
- try_
ned_ paths - Compute normalized entropy distance (NED) for two files using the default rate backend.
- try_
ned_ rate_ backend - Normalized entropy distance under an explicit
backend. - try_
ned_ rate_ bytes - Fallible entropy-rate NED estimate with the default context backend.
- try_
nhd_ paths - Compute normalized Hellinger distance (NHD) between the byte distributions of two files.
- try_
nte_ bytes - Fallible normalized transform-effort (NTE/VI-based) estimate with the default context backend.
- try_
nte_ paths - Compute normalized transform effort (NTE) for two files using the default rate backend.
- try_
nte_ rate_ backend - Normalized transform effort (variation-of-information form) under an explicit
backend. - try_
nte_ rate_ bytes - Fallible entropy-rate NTE estimate with the default context backend.
- try_
resistance_ to_ transformation_ bytes - Fallible resistance-to-transformation estimate:
I(X; T(X)) / H(X)fortx = T(x), using the default context rate backend. - try_
tvd_ paths - Compute total variation distance (TVD) between the byte distributions of two files.
- tvd_
bytes - Total variation distance between the byte distributions of
xandy. - validate_
compression_ backend - Validate a compression backend, including nested rate-backed compressors.
- validate_
rate_ backend - Validate a rate backend, including nested mixture/calibrated subgraphs.