Infrastructure · Primitives
Compress
Lossy or lossless reduction
Definition
Mechanism
Reducing the size of information while preserving the meaning that matters to its consumer. Which meaning matters is the caller's to state; whether the reduction can be undone is the compressor's to declare. No coder shrinks every input.
Invariants
- States whether exact reconstruction of its input is available.
- Where reconstruction is declared available, Inverse(Output) == Input bit-for-bit.
- A compressor that cannot reduce an input reports that rather than emitting an expanded output as compressed.
Risks
Failure modes
None stated.
Relationships
Root pattern: builds on nothing in this library.
Used by
References
Mind
Hierarchical context management
Mind
Semantic compression for long-running contexts
Mind
Lossy compression preserving salience
Society
Multi-stage filter of increasing strictness: wide high-entropy input to narrow certain output
Reference
