pub fn read_bif_from_bytes_with_options(
bytes: &[u8],
options: BifReadOptions,
) -> Result<Bif, BifBinaryError>Expand description
Reads a BIF archive from bytes with explicit options.
§Errors
BifBinaryError::InvalidMagic when the signature is neither BIFF nor
BZF , and BifBinaryError::InvalidVersion for a version
options.input does not accept: CanonicalK1 takes V1 alone, where
CompatibilityAurora also
takes V1.1.
BifBinaryError::InvalidHeader when the header is truncated, either
table runs past the end of bytes, or the two entry counts sum past
u32. BifBinaryError::InvalidData when an entry’s declared data slice
escapes the archive.
BifBinaryError::BzfFeatureDisabled for a BZF archive when the crate
was built without the bzf feature. The signature is recognised either
way, so this says the payload cannot be decompressed rather than that the
file is unknown.
A BIF names no resources: the resrefs live in the chitin.key that points
at it, so nothing here can fail on a name.