Skip to main content

Module rim

Module rim 

Source
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.
RimIndexEntry
One indexed resource: its identity and where its bytes live.
RimReadOptions
Reader options for RIM parsing.
RimResource
One resource entry stored in a RIM archive.

Enums§

RimBinaryError
Errors produced while parsing or serializing RIM binary data.
RimReadMode
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.