Apparently the only differences to Q2 paks are the header being "SPAK"
instead of "PACK" and directory entry's names being 120chars long
instead of 56, see:
https://github.com/id-Software/RTCW-SP/blob/master/src/bspc/l_qfiles.h#L71
This even seems to work.
Refactored a bit to easily support Q2, DK and Sin (and maybe more?) paks
and rewrote mktree() in a shorter, more elegant way without malloc() :)
by default pakextract now assumes Quake(2) format paks, add the -dk
switch to the commandline for Daikatana format.
e.g.: pakextract -dk -l /path/to/Daikatana/data/pak1.pak
will list the files in Daikatana's pak1.pak
This is a best effort implementation, mostly done with gazing at a hex
editor and after the third beer. :) The decompressed .bsp maps are
loading fine, but who knows if things are really correct...