Skip to content

Instantly share code, notes, and snippets.

@RoyAwesome
Created September 14, 2012 02:55
Show Gist options
  • Save RoyAwesome/169c657b091bf356f7fd to your computer and use it in GitHub Desktop.
Save RoyAwesome/169c657b091bf356f7fd to your computer and use it in GitHub Desktop.
.pack file notes
Data is big endian.
Pack files have many sub packs. Each Subpack has an 8 byte header and a list of files in the Subpack.
Subpack Header:
First 4 bytes: uint. offset to the next subpack. 0 denotes the last subpack.
Second 4 bytes: uint. number of files in the sub pack
File List - Has a list of all files. Each entry in the file list table is variable length, but has atleast 16 bytes of data.
4 bytes - string length
string - File name. Not NUL terminated.
4 bytes - Offset into the .pack where the file is located
4 bytes - File Size
4 bytes - checksum
File Data
offset and size are denoted in the file list. Just seek to the offset and read in size bytes.
This pattern repeats multiple times until the first 4 bytes of the subpack header is 0.
@Jakobud
Copy link

Jakobud commented Sep 16, 2012

I know you have the source code available for download via that Dropbox link but do you have it on github also?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment