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:658pub 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:91pub struct CompressorOptionsCompressor options.
ptwm_core::compressor::InputTensor
crates/ptwm-core/src/compressor.rs:71pub 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:158pub fn source_descriptor_for(dtype_code: u16, raw_byte_count: u64, shape: Option<&[u64]>) -> PlaneDescriptorBuild a default source `PlaneDescriptor` keyed on dtype code. The `element_width` follows the canonical mapping used elsewhere in the crate (see `transforms::source::bytes_per_element` and the byte-/word- aware transforms). `length_bytes` is the raw byte count; `Layout::Rows{row_len}` applies when `shape` is supplied, using the row-major last dimension.