First of all, sorry for the long post. (I've been lurking here and on Xentax for a few years now)
aluigi wrote:
I have simply added 3 other algorithms because those BUN/BIN archives are used also in Need for Speed World
There's some interesting work w.r.t. NFSW on the offline server work. (Although it runs against EA's T.O.S.

)
Quote:
where they used RAWW (just copy), JDLZ, HUFF and COMP that are all compresison algorithms that will be available in the next quickbms

I've also stumbled on the COMP type in the PS2 copy of Hot Pursuit 2. (Was developed by Blackbox), but haven't started looking into it as I haven't even determined what file structure zzdata.bin holds.
(I was wondering if you could have a look, most chunks are probably missing names, but using the folder directory from Underground might fill in the the gaps)
--------------------------------------------------------------------------------------------------------------------------
I'm sticking my findings/hypothesis and what I managed to do so far below. (on Hot Pursuit 2 zzdata.bin)
I'm assuming zzdata.bin in NFS:HP2 is stored in chunks based off research leftovers on NFSCars/NFSCheats from others on NFS:Underground (NFS:U) geometry.bin files.
Based on the pattern of bytes in zdir.bin, I guess each chunk of data is stored by 12 bytes (or 3 long/floats), holding data about each chunk in zzdata.bin, but I haven't got anything past that (I haven't found any significance)
I decided to compare the PS2 copy HP2 with a PC copy of NFS: Underground (NFS:U) I had never used before from a 4-pack I bought for the classic (aka, NFS 1-> 6) NFS games .
and so far managed to make these comparisons: (Using a combo of grep and hex editor)
1) CharactersA.bin exists in 2 different instances in the PS2 copy of HP2, but exists as an empty (0 byte) file in Underground (leftover)
2) Same text, LOD node naming convention (like /<CarName>/geometry.bin, /<CarName>/textures.tpk, etc)
3) Comparing the same file name, (eg, 4dr_sedan/geometry.bin), the "header data" is in different places, and the data chunks are stored in different order. (relative to where it is in both respective files)
4) Extract 2 (maybe partial) different instances of Charactersa.bin from HP2 zzdata.bin through a hex editor, but I lack the knowledge of the file system, and how geometry data is stored in binary.
For extra measure, I decided to find a PS2 demo of NFS:Underground to compare against and noted:
1) the header data is more like the PC copy of Underground which I have and
2) ended up seeing the same COMP type header and alot of gibberish (for me) afterwards, along with A1CL and MOIR types.
I've attached samples of zzdata.bin and the complete zDir.bin from the ps2 versions of Hot Pursuit and Underground.
As for the compressions, from spending a few days searching, I've read the compression code is stored in the EXE from posts on NFSCars, but I haven't applied that knowledge yet. (And I'm stuck as how to apply it to PS2 elf files.)