This version is outdated by a newer approved version.DiffThis version (2017/02/02 14:18) was approved by zdimension.The Previously approved version (2017/01/06 18:44) is available.Diff

This is an old revision of the document!

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.1485348148.txt.gz · Last modified: 2017/01/25 13:42 by stohrendorf
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0