IPAK Files: Difference between revisions
Aerosoul94 (talk | contribs) Created page with "Category:PAK Files Category:BO2 IPAK's, implemented in black ops 2, are basically an archive of compressed image data. == Structure == Thanks to kokole for the struct..." |
No edit summary |
||
| Line 1: | Line 1: | ||
[[Category:PAK Files]] | [[Category:PAK Files]] | ||
[[Category:BO2]] | [[Category:BO2]] | ||
IPAK's, implemented in | IPAK's, implemented in [[:Category:BO2|Black Ops 2]], are basically an archive of compressed image data. | ||
== Structure == | == Structure == | ||
| Line 7: | Line 7: | ||
struct ipak_header_t | struct ipak_header_t | ||
{ | { | ||
char identifier[4]; // "IPAK" | |||
unsigned int version; //0x50000 | |||
unsigned int fileSize; | |||
unsigned int sectionCount; //from what I've seen it's always 2 (1 = info 2 = data) | |||
}; | }; | ||
struct section_t | struct section_t | ||
{ | { | ||
unsigned int sectionIndex; //enum 0x1 = info, 0x2 = data | |||
unsigned int sectionStart; | |||
unsigned int sectionLength; | |||
unsigned int numOfEntries; // each entry is a compressed iwi file in section 2 and entry info in section 1 | |||
}; | }; | ||
struct entry_info_t | struct entry_info_t | ||
| Line 38: | Line 38: | ||
{ | { | ||
int blockCount; // actual blockcount = *(byte*)&blockCount[0]; | int blockCount; // actual blockcount = *(byte*)&blockCount[0]; | ||
}; | }; | ||
struct block_info_t | struct block_info_t | ||
{ //enum 0x0 = plaintext, 0x1 = encrypted | { //enum 0x0 = plaintext, 0x1 = encrypted | ||
unsigned int info; //(depending on endian) blockSize = (info & 0xFFFF); , compressedFlag = info >> 24; | |||
}; // 4 bytes | }; // 4 bytes | ||
Revision as of 20:03, 29 December 2013
IPAK's, implemented in Black Ops 2, are basically an archive of compressed image data.
Structure
Thanks to kokole for the structure.
struct ipak_header_t
{
char identifier[4]; // "IPAK"
unsigned int version; //0x50000
unsigned int fileSize;
unsigned int sectionCount; //from what I've seen it's always 2 (1 = info 2 = data)
};
struct section_t
{
unsigned int sectionIndex; //enum 0x1 = info, 0x2 = data
unsigned int sectionStart;
unsigned int sectionLength;
unsigned int numOfEntries; // each entry is a compressed iwi file in section 2 and entry info in section 1
};
struct entry_info_t
{
u32 hash; // checksum, type?
u32 id;
u32 entryStart; // location of compressed iwi file
u32 entryLength;
}; // 16 bytes
struct entry_t
{
entry_header_t header;
block_info_t blocks[31]; //they can be null, actual number of blocks is header->blockCount;
};
struct entry_header_t
{
int blockCount; // actual blockcount = *(byte*)&blockCount[0];
};
struct block_info_t
{ //enum 0x0 = plaintext, 0x1 = encrypted
unsigned int info; //(depending on endian) blockSize = (info & 0xFFFF); , compressedFlag = info >> 24;
}; // 4 bytes
Decompression Methods
PC:
http://pastebin.com/vd9t2U2B
PS3:
1.00 t6mp_ps3f.self - 0x6AEA78
XBOX:
tu9 default_mp.xex - 0x828E5090 tu13 default_mp.xex - 0x828E6308