PTWM
ptwm_core

ptwm_core::fit

Shared codec state fitters. Each codec contributes its own fitter module; the top-level fit_shared aggregates their outputs into a flat SharedStates::entries list (codec-agnostic prelude allocation).

ptwm_core::fit

Shared codec state fitters. Each codec contributes its own fitter module; the top-level fit_shared aggregates their outputs into a flat SharedStates::entries list (codec-agnostic prelude allocation).

rsmod

ptwm_core::fit

crates/ptwm-core/src/fit/mod.rs:1
mod fit

Shared codec state fitters. Each codec contributes its own fitter module; the top-level `fit_shared` aggregates their outputs into a flat `SharedStates::entries` list (codec-agnostic prelude allocation).

rsfn

ptwm_core::fit::fit_shared

crates/ptwm-core/src/fit/mod.rs:89
pub fn fit_shared(planes_value: &[&[u8]], planes_scale: &[(&[u8], u32)]) -> Result<SharedStates, PtwmCoreError>

Fit shared codec states across all matching planes. PGC fits on `planes_value`; Order1ScaleAC fits on `planes_scale`. Returns a flat `Vec<SharedStateEntry>` — the compressor allocates `shared_state_id` sequentially from the entry index.

rstype

ptwm_core::fit::SharedStateEntry

crates/ptwm-core/src/fit/mod.rs:20
pub struct SharedStateEntry

One entry destined for the container prelude. Codec-agnostic — the compressor allocates `shared_state_id` from this entry's index in `SharedStates::entries`.

Construct via [`SharedStateEntry::new`] so `state_bytes` are validated against the codec's parser before they reach the wire. The fields are `pub` for serialization convenience but the constructor is the single supported entry point.
rstype

ptwm_core::fit::SharedStates

crates/ptwm-core/src/fit/mod.rs:81
pub struct SharedStates