Skip to main content

read_lip_from_bytes

Function read_lip_from_bytes 

Source
pub fn read_lip_from_bytes(bytes: &[u8]) -> Result<Lip, LipBinaryError>
Expand description

Reads a LIP file directly from bytes.

§Errors

LipBinaryError::InvalidHeader when bytes are shorter than the header or its keyframe count runs past the end, LipBinaryError::InvalidMagic when the signature is not LIP , LipBinaryError::InvalidVersion for a version other than v1.0, and LipBinaryError::InvalidData when a keyframe’s shape byte falls off the end. A shape code the engine does not define is kept rather than rejected, so an unknown one round-trips.