Daggerfall Mod:PAK file formats< Mod / Daggerfall: Daggerfall Mod: File Formats(Redirected from Daggerfall:PAK file formats)
PAK is a compression format very similar to RLE, except there are no uncompressed "runs". Since there are no uncompressed "runs", it is not suitable for arbitrary data. This format is used by CLIMATE.PAK and POLITIC.PAK.
A stream of PAK-compressed data is composed of a contiguous list of one or more PakRun structures.
A PakFile is merely a contiguous list of one or more PakRun structures.
The 3 byte long PakRun structure is composed of a UInt16 Count field, immediately followed by a single UInt8 Value. This value is to be repeated Count times.
|0-1||UInt16||Count||The number of times the Value field must be copied.|
|2||UInt8||Value||The value to be copied to the output buffer.|