pub fn read_rim_from_bytes_with_options(
bytes: &[u8],
options: RimReadOptions,
) -> Result<Rim, RimBinaryError>Expand description
Reads a RIM archive from bytes with explicit read options.
§Errors
RimBinaryError::InvalidMagic when the signature is not RIM , and
RimBinaryError::InvalidVersion for an unsupported version.
RimBinaryError::InvalidHeader when the header is truncated or the key
table it declares runs past the end of bytes. A zero keys_offset is one
of these under
StrictExplicitOffsets
and not under CanonicalK1, so the mode decides whether an
implicit-layout file reads.
RimBinaryError::InvalidData when a key’s declared data range escapes
the archive, RimBinaryError::InvalidResRef for an entry name that is
not a valid resref, and RimBinaryError::TextDecoding for a name that is
not valid text in the archive’s encoding.
Payload bytes are not validated, so an entry whose contents are not the format its type claims reads without complaint.