Skip to main content

Module stream

Module stream 

Source
Expand description

Bounded payload reads shared by native format adapters.

Enums§

DeclaredSizeFailure
Why an entry’s inflated stream was refused.

Functions§

read_bounded
Read through EOF under an actual expanded-byte cap, including a one-byte overrun probe. Does not trust a declared ZIP size.
read_declared_size
Inflate exactly the size bytes an entry declares, after the prefix already read from it. One more byte is requested to confirm that the stream ends there, which is also when the reader checks the CRC. A stream longer or shorter than declared is refused, so the declared size the ratio and budget checks used is the size produced, and the buffer is reserved once at that size.