This version is outdated by a newer approved version.DiffThis version (2017/01/06 17:43) was approved by zdimension.

This is an old revision of the document!


PAK file format (TR4-TR5)

Overview

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.

Layout

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.1483702805.txt.gz · Last modified: 2017/01/06 11:40 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