Skip to main content

MAX_UNPACKED_BYTES

Constant MAX_UNPACKED_BYTES 

Source
pub const MAX_UNPACKED_BYTES: u64 = _; // 268_435_456u64
Expand description

How many bytes unpack will decompress out of one archive, over all its entries.

A deflate stream can expand by about a thousand to one, so a small .ork could otherwise ask for more memory than a machine has, which aborts rather than returning the error Loft lesson L56: malformed input must give an error rather than crash asks for. The largest design in the reference corpus unpacks to under 6 MiB, so 256 MiB is room to spare. Use unpack_within to choose another.