File

Files fill the bulk of a DBPF archive.

A file header exists only if this file is compressed. Remarks: Each file is either uncompressed or compressed. To check if a file is compressed you first need to read the DIR file, if it exists. If no <a href="https://www.wiki.sc4devotion.com/index.php?title=DIR">DIR</a> entry exists, then no files within the package are compressed.

struct File (
bool Compressed = Flag!"compressed" = false
) {}

Alias This

contents

Members

Functions

size
uint size()

Uncompressed size of this file, in bytes.

Variables

contents
ubyte[] contents;

Contents of this file.

header
FileHeader header;

Exists only if this file is compressed.

Meta