Skip to main content

Module compression_policy

Module compression_policy 

Source
Expand description

Compression policy enum and storage tag for the Corpus aggregate.

Three mutually exclusive policies control how a [Corpus] stores embedding vectors:

PolicyTransformStorageTagTypical compression ratio
CompressFull codec pipeline (rotate → quantize → optional residual)U84–8×
PassthroughRaw f32 bytes, no transformationF32
Fp16Each f32 cast to f16 little-endianF16

The policy is set at corpus construction time and is immutable after the first insert call. Attempting to change it raises CorpusError::PolicyImmutable.

Enums§

CompressionPolicy
Determines how vectors are stored in a Corpus.
StorageTag
Describes the physical byte layout of stored vector data.