Expand description
.drs is the resource archive file format for the Genie Engine, used by Age of Empires 1/2 and Star Wars: Galactic Battlegrounds. .drs files contain tables, each of which contain resources of a single type. Resources are identified by a numeric identifier.
§Example
use std::fs::File;
use genie_drs::DRSReader;
let mut file = File::open("test.drs")?;
let drs = DRSReader::new(&mut file)?;
for table in drs.tables() {
for resource in table.resources() {
let content = drs.read_resource(&mut file, table.resource_type, resource.id)?;
println!("{}: {:?}", resource.id, std::str::from_utf8(&content)?);
}
}
Structs§
- DRSHeader
- The DRS archive header.
- DRSReader
- A DRS archive reader.
- DRSResource
- A single resource in a DRS archive.
- DRSTable
- A table containing resource entries.
- DRSWriter
- Generator for .drs archives.
- InMemory
Strategy - Create the entire DRS file in memory first, then flush it to the output.
- Parse
Resource Type Error - An error occurred while parsing a resource type.
- Reserve
Directory Strategy - Writer strategy that reserve space for metadata for the given amount of tables and files at the top of the file, then fills it in at the end.
- Resource
Type - A resource type name.
Traits§
- Write
Strategy - Strategy to use when writing files to the archive.
Type Aliases§
- DRSResource
Iterator - An iterator over DRS resource metadata structs.
- DRSTable
Iterator - An iterator over DRS table metadata structs.