Skip to main content

decode_compressed_mesh

Function decode_compressed_mesh 

Source
pub fn decode_compressed_mesh(
    input: &[u8],
) -> Result<CompressedMesh<'_>, CompressedMeshError>
Expand description

Decodes a canonical Bunny compressed mesh byte stream.

The accepted profile is documented in docs/goalposts/v0.4.0-gp3.md. Decoding borrows the vertex and triangle byte sections, validates all triangle indices, and performs no heap allocation on the accepted path.

ยงErrors

Returns CompressedMeshError when any header, length, bounds, count, or payload invariant is violated.