In the Groove PCK

The rhythm dancing game In the Groove internally uses several PCK archive files to store game data. The format is not publicly documented, but has been reverse-engineered.

Format details
A PCK archive consists overall of three segments: a short fixed header, a table listing file locations and details, and file data (which may be compressed).

Within the file, all strings are ASCII (the behavior of high-bit strings is unknown, as it is not used), all numbers are stored as little-endian 32-bit integers, and all sizes are in bytes.

Header
A PCK archive always begins with a 132-byte header:

File table
Immediately following the header is a list of the files contained in the archive. The order can be arbitrary. Each file is described with the following variable-length structure:

File data
While the data for files can technically be arranged however desired, in practice each file is stored in the same order given in the file table, at offsets specified in that table.

If the compress flag is set for a file, the data for that file is deflated using zlib. The following Python code can be used to implement compression and decompression:

compressed_data = zlib.compress(data, 9)[2:] decompressed_data = zlib.uncompress(data, -15)