Files in a DRS archive do not have "names" in the typical sense.
They have an ID and an extension.
###Header
The DRS header contains a copyright string, a version string,
an archive type string, the number of embedded files,
and the offset of the first embedded file from the start of the DRS archive.
Total: 64 bytes
Length | C# Type | Description |
---|---|---|
40 bytes | string | Copyright Info |
4 bytes | string | File Version |
12 bytes | string | Archive Type |
4 bytes | int | Table Count |
4 bytes | int | 1st File Offset |
####Output for interfac.drs:
Copyright (c) 1997 Ensemble Studios.
1.00
tribe
4
2212
Note that after the tribe
string there should be 7 "C String-Terminators" (\0
).
###Table Headers
Files are sorted by their file extension into 'tables'.
This makes extracting specific file types easier since each table only contains a single file type.
####Table headers are laid out like so: Total: 12 bytes
Length | C# Type | Description |
---|---|---|
1 bytes | byte | Related to file type |
3 bytes | string | Extension (reversed) |
4 bytes | int | Table Offset |
4 bytes | int | File Count |
###Tables
At the start of each table is n groups of data related to the files in this table (where n is File Count
).
####File Info Total: 12 bytes
Length | C# Type | Description |
---|---|---|
4 bytes | int | File ID |
4 bytes | int | File Offset |
4 bytes | int | Table Size |