PAK (File Format)/Evolution Worlds
PAK is a container file format used in Evolution Worlds. PAK files may contain NEO, HSD, or other nested PAK files. The filenames of internal sub-files is not stored.
File Format
The file byte order is always big endian.
Header
The file starts with the following header:
| Offset | Type | Description |
|---|---|---|
| 0x00 | UInt32 | Number of entry table slots (S). The number of sub-files is S - 1, the last slot being a terminator. |
| 0x04 | UInt32[S] | Sub-file offsets. |
| 0x04 + S * 4 | UInt32[S] | Sub-file sizes in bytes, not including padding. |
The header is padded with zeroes up to the next 0x20 byte boundary, so the first sub-file always starts at align(4 + 8 * S, 0x20), which is also the value of the first offset.
Terminator Slot
The last slot of both arrays does not describe a sub-file. It seems to repeat the first offset and has a size of 0 and none of the loader functions seem to read it, instead, the game derives the sub-file count by subtracting 1 from the slot count.
Sub-file Data
Sub-files are stored back to back in table order, each padded with zeroes to a multiple of 0x20 bytes, so that offset[i] = offset[i - 1] + align(size[i - 1], 0x20). The size of the whole PAK is therefore offset[n] + align(size[n], 0x20), where n is the last sub-file (and not the terminator slot).
Tools
The following tools can handle PAK files:
- (none)