This version (2017/04/15 17:45) was approved by stohrendorf.The Previously approved version (2017/01/25 13:42) is available.Diff

PAK file format (TR4-TR5)


TR4 and TR5 use a file format with the extension PAK for certain files (mostly pictures). This file format is actually a container for raw binary content, compressed using zlib.


struct pak_file
    uint32_t UncompressedSize; // Uncompressed size of data (4 bytes)
    uint8_t CompressedData[]; // zlib-compressed data (read until EOF)
The UncompressedSize field is used by the game to allocate the buffer for uncompressed data. Do not put a wrong value here, or it’ll result in unexpected and wrong behaviour.
trs/pak.txt · Last modified: 2017/02/02 20:56 (external edit)
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0