...
ByteArrayOutputStream stage1 = unCompress(null,null);
ByteBuffer indexes = ByteBuffer.wrap( stage1.toByteArray() ).order(ByteOrder.LITTLE_ENDIAN);
byte line[] = new byte[0x11c];
long loc_pointer = fileChannel.position();
while ( indexes.hasRemaining() ) {
indexes.get(line);
ByteBuffer bbline = ByteBuffer.wrap(line).order(ByteOrder.LITTLE_ENDIAN);
String filename = new String(line).split("\0")[0].toLowerCase();
fileContent.put(filename, new MpakObject(loc_pointer,bbline.getInt((0x11c-8)),bbline.getInt((0x11c-16))));
loc_pointer+=bbline.getInt((0x11c-8));
}
...
{
byte filename[] = byte[256];
int unixtimestamp;
int attribute_count(?); // .. this value is always 4 ..
// attributes?
int uncompressed_seek; // perhaps Gamebryo or Mythic have virtual filesystem which might automatically uncompress whole mpk file content when loading or something.
int uncompressed_size;
int compressed_seek; <- absolute file seek = this + end of stage1
int compressed_size;
//
int uncompressed_filesum(?); // value seems to be +/- integer .. so filesum might be option here :P
}
Return to “%s” Third Party Tools
Users browsing this forum: No registered users and 1 guest