MPQKit 1.0b1

MPQKit 1.0b1 is the culmination of many months of development. It fully supports version 0 (the original format limited to less than 4 GB) and version 1 (or the extended format not limited to 4 GB) MoPaQ archives, all known compression methods, all known file metadata attributes, weak and strong signature verification, extensive error handling capabilities with NSError variants of most methods, and an undo operation method. Still missing from this release are a number of performance optimization, the rename operation and the test suite.

Indeed, the next big step towards MPQKit 1.0 is the construction of an extensive test suite to make sure MPQKit never regresses in functionality or performance and to ensure it remains compliant with the MoPaQ specification. The test suite will include a large number of operation sequences, detailed archive structural checks, and a collection of good and bad MoPaQ archives utilizing all aspects of the specification. It is my hope not only MPQKit, but all third-party MoPaQ libraries, will benefit from the MPQKit test suite.

I’ve also taken the liberty to clean up the MPQKit Subversion repository, which now sports the standard trunk, branches and tags structure. Obviously, there is now a 1.0b1 tag for those wanting to compile from source. Of course, you can also checkout the trunk.

Finally, the documentation has been updated to reflect all the changes in the code. Not everything is done yet, but all the important constants, structures and methods are accurately documented.

Download MPQKit 1.0b1. More information on the project is available on the MPQKit project page and on the MPQKit development wiki.

Because I’m too lazy to check for myself… what does it do for editing files? Does it do it the way MPQ2K did, of setting files to deleted and then compacting? Or does it always produce a compacted file? Or am I mis-remembering MPQ2K?

MPQKit is a framework, it’s aimed at software developers. It is at the core of MPQ Extractor and MPQFS.

I know, but as far as I remember the MPQ format has provisions for deleting a file in place without “compacting” the file, flagging something in the table of contents and keeping the file’s data in the archive.

That is correct. MPQKit doesn’t have a compaction method as of right now.

So would you need to create a “new” archive if you wanted it compacted, or does deleting a file do the quote-unquote “right” thing?

You’d have to create a new one. In most cases, unless you delete a lot of files, or large files, compaction isn’t really worth it. Nevertheless, it’s certainly something that will be in 1.0 or 1.1.