Skip to main content

get_buffer_offset

Function get_buffer_offset 

Source
pub fn get_buffer_offset(buffer: Uint8Array) -> u32
Expand description

Get offset within a Uint8Array which is aligned on BUFFER_ALIGN.

Does not check that the offset is within bounds of buffer. To ensure it always is, provide a Uint8Array of at least BUFFER_SIZE + BUFFER_ALIGN bytes.