Crazy Racing PAK: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Ikskoks
(Created page with "{{GRAFPageHeader}} == PAK == * ''' Format Type ''': Archive <br> * ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br> * ''' Signature '''...")
imported>Ikskoks
 
(17 intermediate revisions by the same user not shown)
Line 11: Line 11:
<div class="toccolours mw-collapsible" id="mw-customcollapsible-myDivision" style="width:800px; overflow:auto;">
<div class="toccolours mw-collapsible" id="mw-customcollapsible-myDivision" style="width:800px; overflow:auto;">
<pre>
<pre>
// TODO
// Crazy Racing PAK file format  (by barncastle)
 
struct Archive
{
    uint FileCount;
    FileInfo FileInfos[FileCount];
    byte Data[x];
}
 
struct FileInfo
{
    uint Hash;
    int Offset;        // multiply by 4
    int CompressedSize; // LZMA
}
</pre>
</div>
 
=== Hash Algorithm ===
 
<div class="toccolours mw-collapsible" id="mw-customcollapsible-myDivision" style="width:800px; overflow:auto;">
<pre>
// Hash function (by barncastle)
 
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>
</div>
</div>
Line 18: Line 53:


* Files are compressed with '''LZMA''' compression.
* Files are compressed with '''LZMA''' compression.
* Filenames are '''hashed'''. [https://pastebin.com/4HgKJPZD Here] is the list of filenames.


=== Games ===  
=== Games ===  
Line 34: Line 70:


[[Category:Complete Complete|Crazy Racing PAK]]
[[Category:Complete Complete|Crazy Racing PAK]]
[[Category:Platform PC|Crazy Racing PAK]]
[[Category:Platform Android|Crazy Racing PAK]]
[[Category:CE None|Crazy Racing PAK]]
[[Category:CE Both|Crazy Racing PAK]]
[[Category:Format_Archive | Type: Archive]]
[[Category:Format_Archive | Type: Archive]]
[[Category:Extension_pak | Extension: pak]]
[[Category:Extension_pak | Extension: pak]]
[[Category:BMS_None | BMS: None]]
[[Category:BMS_None | BMS: None]]
[[Category:Hash]]
[[Category:LZMA compression]]
[[Category:File Format]]
[[Category:File Format]]

Latest revision as of 10:55, 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  (by barncastle)

struct Archive
{
    uint FileCount;
    FileInfo FileInfos[FileCount];
    byte Data[x];
}

struct FileInfo
{
    uint Hash;
    int Offset;         // multiply by 4
    int CompressedSize; // LZMA
}

Hash Algorithm

// Hash function (by barncastle)

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. Here is the list of filenames.

Games

List of games using this file format:

  • Crazy Racing (Android) (*.PAK)

QuickBMS Script

Not written yet.

Compatible Programs

None.