Tsunami RLB
RLB
- Format Type : Archive
- Endian Order : Little Endian
RLB files are resource archives used in various games from Tsunami. There are several variations in the format reflecting the evolution of the format since it was used in a progression of games from the same publisher. Much of this information was gleaned from studying the source code of the ScummVM project.
Structure
RLB files are comprised of a series of resource blocks starting with a signature of 'TMI-'. Each resource block starts with the following 6-byte data structure:
bytes 0-3 'TMI-' signature byte 4 resource type byte 5 number of entries in this resource block
Each entry in the resource begins with the following 12-byte structure:
bytes 0-1 resource ID bytes 2-3 compressed size bytes 4-5 uncompressed size byte 6 high nibbles of the compressed and uncompressed sizes byte 7 type (bits 7-5) bytes 8-11 payload offset
Byte 6 contains the high 4 bits of the uncompressed size in bits 7-4 and the high 4 bits of the compressed size in bits 3-0. Thus, the largest size which can be specified is 220 = 1,048,576 bytes.
The high 3 bits of byte 7 are interpreted by ScummVM as 'type' and the field is expected to be either 0 (uncompressed) or 1 (compressed).
The payload offset specifies the offset relative to the beginning of the resource block (beginning of the 'TMI-' signature).
Compression Format
(implemented in ScummVM; to be documented)