Skip to main content

MAX_RESERVED

Constant MAX_RESERVED 

Source
const MAX_RESERVED: usize = _; // 33_554_432usize
Expand description

How much decode_all will reserve up front, at most.

The size comes out of the frame header, which is whatever the data claims it is - so it is capped, or a few bytes of input could ask us for an arbitrary amount of memory. Past this the output just grows as it goes, which is what the whole function used to do; the reserve is only worth anything for the first few megabytes anyway.