Expand description
RIM archive support. RIM binary reader and writer.
RIM is a compact resource archive format used by KotOR module assets. This module implements strict parsing plus deterministic serialization.
§Shape of the container
A fixed 120-byte header, one key table located by keys_offset, and the
payload. Each key entry carries its own data_offset and data_size, so
the payload is addressed per entry rather than as a block.
The single table is what makes a RIM leaner than an ERF: an
ERF splits the same bookkeeping across two parallel tables, one naming each
resource and one locating it, while a RIM entry does both at once. There is
no localized string block and no description either.
Three reserved regions round-trip verbatim, the largest being 96 bytes at
the tail of the header. Byte-level field maps for the header and the key
entry live in docs/src/formats/archives/rim.md, with the engine’s own
load sequence.
Structs§
- Rim
- In-memory RIM archive.
- RimIndex
- A lazily-read RIM archive.
- RimIndex
Entry - One indexed resource: its identity and where its bytes live.
- RimRead
Options - Reader options for RIM parsing.
- RimResource
- One resource entry stored in a RIM archive.
Enums§
- RimBinary
Error - Errors produced while parsing or serializing RIM binary data.
- RimRead
Mode - Input-profile behavior for RIM readers.
Functions§
- read_
rim - Reads a RIM archive from a reader.
- read_
rim_ from_ bytes - Reads a RIM archive from bytes.
- read_
rim_ from_ bytes_ with_ options - Reads a RIM archive from bytes with explicit read options.
- read_
rim_ with_ options - Reads a RIM archive from a reader with explicit read options.
- write_
rim - Writes a RIM archive to a writer.
- write_
rim_ to_ vec - Serializes a RIM archive to bytes.