Skip to main content

Module encoding

Module encoding 

Source
Expand description

HTTP content-encoding handling for the proxy: a small Encoding model plus streaming decode (and, in a later task, encode) so repair operates on plaintext.

Enums§

Encoding
An HTTP content coding.

Functions§

decode_stream
Wrap a content-encoded byte stream so it yields the DECODED plaintext bytes. Identity/Unknown pass through unchanged (the caller decides not to repair an Unknown-coded body).
encode_stream
Re-encode a plaintext byte stream with enc, flushing after every input chunk so output is emitted promptly (never buffered until end of stream). Identity/Unknown pass through unchanged. Uses fast compression levels (high quality costs ms per call and buys almost nothing on tiny flushed payloads).

Type Aliases§

ByteStream
A boxed byte stream with io errors — the common currency of the codec layer.