Skip to main content

read_ssf_from_bytes

Function read_ssf_from_bytes 

Source
pub fn read_ssf_from_bytes(bytes: &[u8]) -> Result<Ssf, SsfBinaryError>
Expand description

Reads an SSF file directly from bytes.

ยงErrors

SsfBinaryError::InvalidMagic and SsfBinaryError::InvalidVersion for a header that is not an SSF v1.1, SsfBinaryError::InvalidHeader when the sound-table offset overlaps the header or its entries run past the end of bytes, and SsfBinaryError::InvalidData when the bytes trailing the core table are not a whole number of entries. Those trailing entries are kept, which is what lets a file carrying more than the documented slots round-trip.