Catalog (.pki)
Note
The game had the majority of its data files packed in a custom dynamic archive. Within that system, each file was identified by the CRC-32 value of its filename relative to the installation root.
The crc value uses the standard CRC-32 polynomial 0x04C11DB7, an init value of 0xFFFFFFFF, no output XOR and reverses neither input nor output. The filenames are processed in lowercase, with Win32
\
delimiters and a padding of 4 0x00 bytes at the end.Both filetypes include a representation of a binary tree for all their entries. The root node is always at
size / 2
. Each entry has a field for a left and a right child entry. Both filetypes have their main entry list sorted by the crc value, making it possible to use binary search.
Note
- id:
pki
- file-extension:
pki
- endian:
le
- imports:
../common/common
Sequence
[3, 0, 0, 0]
version[u4] num_file_names
[common::u4_str] file_names
repeat-expr:num_file_names
[u4] num_pack_files
[master_pack_index] pack_files
repeat-expr:num_pack_files
Type master_pack_index
Sequence
[u4] crc
[s4] lower_crc
[s4] upper_crc
[u4] pack_files_index
[common::bool] is_compressed
Size:4