Crazy Racing PAK: Difference between revisions
Jump to navigation
Jump to search
imported>Ikskoks |
imported>Ikskoks |
||
| Line 25: | Line 25: | ||
int Offset; // multiply by 4 | int Offset; // multiply by 4 | ||
int CompressedSize; // LZMA | int CompressedSize; // LZMA | ||
} | |||
</pre> | |||
</div> | |||
=== Hash Algorithm === | |||
<div class="toccolours mw-collapsible" id="mw-customcollapsible-myDivision" style="width:800px; overflow:auto;"> | |||
<pre> | |||
uint Hash(string value) | |||
{ | |||
// append suffix and lowercase | |||
// e.g. Res\ALight.mesh => res\res\alight.mesh | |||
value = (@"res\" + value).ToLower(); | |||
uint h = 0u; | |||
for (int i = 0; i < value.Length; i++) | |||
h = 31 * h + (byte)value[i]; | |||
return h; | |||
} | } | ||
</pre> | </pre> | ||
Revision as of 10:51, 13 August 2022
Back to index | Edit this page
PAK
- Format Type : Archive
- Endian Order : Little Endian
- Signature : None
Format Specifications
// Crazy Racing PAK file format
struct Archive
{
uint FileCount;
FileInfo FileInfos[FileCount];
byte Data[x];
}
struct FileInfo
{
uint Hash;
int Offset; // multiply by 4
int CompressedSize; // LZMA
}
Hash Algorithm
uint Hash(string value)
{
// append suffix and lowercase
// e.g. Res\ALight.mesh => res\res\alight.mesh
value = (@"res\" + value).ToLower();
uint h = 0u;
for (int i = 0; i < value.Length; i++)
h = 31 * h + (byte)value[i];
return h;
}
Notes and Comments
- Files are compressed with LZMA compression.
- Filenames are hashed.
Games
List of games using this file format:
- Crazy Racing (Android) (*.PAK)
QuickBMS Script
Not written yet.
Compatible Programs
None.