ptwm_core::compressor
ptwm_core::compressor
PPG compressor entry point.
ptwm_core::compressor
crates/ptwm-core/src/compressor.rs:1mod compressorPPG compressor entry point.
ptwm_core::compressor::compress_model
crates/ptwm-core/src/compressor.rs:972pub fn compress_model(writer: W, inputs: &[InputTensor<'_>], opts: CompressorOptions) -> Result<Vec<u16>, PtwmCoreError>PPG entry point. Each input tensor carries one or more candidate [`Chain`]s; the compressor selects the chain that produces the smallest total compressed payload (multi-chain trial-encode), then writes a chain-registry-backed `.ptwm` container.
ptwm_core::compressor::CompressorOptions
crates/ptwm-core/src/compressor.rs:97pub struct CompressorOptionsCompressor options. `Default` gives no hint, no hash or CRC, dispatcher codec selection, whole planes and the compact container layout (`\x89PTWC`, readable by v1.2 and later). Set `container_layout` to [`ContainerLayout::Legacy`] for output that v1.1 and later read.
ptwm_core::compressor::InputTensor
crates/ptwm-core/src/compressor.rs:73pub struct InputTensorPer-tensor input for the compressor. The caller supplies one or more candidate [`Chain`]s; the compressor runs each forward+trial-encode and keeps the chain with the smallest output (multi-chain trial-encode).
ptwm_core::compressor::source_descriptor_for
crates/ptwm-core/src/compressor.rs:172pub fn source_descriptor_for(dtype_code: u16, raw_byte_count: u64, shape: Option<&[u64]>) -> PlaneDescriptorBuild a default source `PlaneDescriptor` keyed on dtype code.