Changes

Jump to navigation Jump to search
14 bytes removed ,  26 February
m
readability improvements
Line 1: Line 1:  
TrackMania '''.pak files''' are archives that contain a collection of other files, much like .zip archives. They are found in the "Packs" folder in the game installation directory. In ManiaPlanet, there are also '''.Pack.Gbx''' files with the same purpose.
 
TrackMania '''.pak files''' are archives that contain a collection of other files, much like .zip archives. They are found in the "Packs" folder in the game installation directory. In ManiaPlanet, there are also '''.Pack.Gbx''' files with the same purpose.
   −
In older TM versions, .pak files are both zlib-compressed and encrypted (version 3); even the file index containing the file names and directory structure is encrypted. In ManiaPlanet, they include an uncompressed/uncrypted section as well (versions 6+). Since version 18+, compression has been switched to {{wp|LZ4 (compression algorithm)|LZ4}} with a specific dictionary.
+
In older TM versions, .pak files are both zlib-compressed and encrypted (version 3); even the file index containing the file names and directory structure is encrypted. In ManiaPlanet, they include an uncompressed/uncrypted section as well (versions 6+). Since version 18, compression has switched to {{wp|LZ4 (compression algorithm)|LZ4}} with a specific dictionary.
    
== Encryption ==
 
== Encryption ==
Line 73: Line 73:  
  }
 
  }
   −
This function gets called in two several cases: when reading the .pak header, and when reading the contents of a .gbx file embedded in the pak.
+
This function gets called in two cases: when reading the .pak header, and when reading the contents of a .gbx file embedded in the pak.
    
For the header, the ivXor setup only happens if there are three or more folders, and the name of the third folder is 4 or more characters in length. The folder's name is converted to UTF16 and CalcIVXor(&wszName[2], 4) is called (i.e. it runs on the third and fourth character of the name, both characters being two bytes). If the one of the folder conditions is not met, ivXor stays zero.
 
For the header, the ivXor setup only happens if there are three or more folders, and the name of the third folder is 4 or more characters in length. The folder's name is converted to UTF16 and CalcIVXor(&wszName[2], 4) is called (i.e. it runs on the third and fourth character of the name, both characters being two bytes). If the one of the folder conditions is not met, ivXor stays zero.
44

edits

Navigation menu