RAF: Riot Archive File

Background
The game data that was previously found in HeroPak_client.zip has been moved into several .raf and .raf.dat files. These files are distributed throughout the subfolders in the following directory: /RADS/projects/lol_game_client/filearchives/ Riot released the format in a post official forums shortly after making the update.

Format Description
Note that all values which are more than one byte are stored in Little Endian format. Also note that the original document referred to paths as strings. There are two files, the .raf file and the .raf.dat file. The .raf.dat file contains data for files (many of which are compressed), whereas the .raf contains the information about where to unpack the files. All offsets and sizes are in bytes. Note values prefixed by "0x" indicate hexidecimal (base 16) notation.

Overview of .raf file
The .raf file contains two important lists: the file list and the path list. The file list details where to look up a particular file in the .raf.dat file, as well as where to look up that file's path in the path list. The path list tells one where the path string is in the .raf file.

Hash Function
The hash function is described below in psuedo code. Note that strings here are ASCII-encoded, meaning each character is exactly one byte. The type uint32 represents a 32-bit unsigned integer. The ^ symbol is used to denote a 32-bit exclusive-or.

HashString(str:String):uint32 uint32 hash = 0 uint32 temp = 0 foreach(character in str): hash = (hash << 4) + character.toLowerCase temp = hash & 0xf0000000 if temp != 0 hash = hash ^ (temp >> 24) hash = hash ^ temp return hash