Skip to main content

allocation_bound

Function allocation_bound 

Source
pub fn allocation_bound(layers: u64, total_pixels: u32) -> u64
Expand description

The decompressed-size bound a LAYR chunk’s frame may not exceed.

Grayscale REE costs at most about 5 bytes per pixel plus framing, which is what a reader checks a frame’s declared content size against before allocating, over the layers whose slices the chunk holds (section 11.3).