Expand description
The compression layer (SPEC §1.1) — the crypto-free codec that runs BEFORE the seal (WU2). A payload is compressed in its OWN fresh context (never a shared running context — the §5.5 CRIME/ BREACH boundary), then WU2 seals the compressed bytes.
Two codecs ship in WU1: raw/identity (id 0, mandatory) and zstd level-3 (id 1, recommended). The reserved id bands (2..=63 standard, 64..=255 experimental) are rejected cleanly, never mis-decoded.
Structs§
- Compressed
Payload - A compressed payload ready to be sealed: the algorithm id, the compressed bytes, and the declared
original length (the bomb-guard bound carried in the sealed
InnerMessage, SPEC §5.2).
Constants§
- COMPRESSION_
NONE - Raw / identity codec: the payload bytes verbatim. Mandatory (SPEC §1.1).
- COMPRESSION_
ZSTD - zstd codec, pinned to level 3, single-frame, no dictionary (SPEC §1.1/§1.2).
Functions§
- compress_
payload - Compress a payload for sealing, choosing the codec per the SPEC §1.1 raw threshold.
- decompress_
payload - Decompress a sealed payload under the SPEC §1.1 bomb guard.