Fat Princess .QRK Archive - Failing to Completely Extract

Doubts, help and support about QuickBMS and other game research tools
LudaX
Posts: 2
Joined: Wed Oct 20, 2021 2:23 pm

Fat Princess .QRK Archive - Failing to Completely Extract

Post by LudaX »

Hey there! Admittedly a complete newbie to QuickBMS, but I'm having issues extracting a .QRK archive for the game Fat Princess. This archive seems to be in a proprietary format related to the Quark Engine by Titan Studios.

I'm able to extract quite a few of the contained files, but the BMS script seems to choke half way through when it gets to data\animation\worker_axe_release.aaf.

The output I get is the following:

Code: Select all

...
  00d21963 276        data\animation\worker_axe_charged_cycle.txt
  00d219e2 48608      data\animation\worker_axe_charged_release.aaf
  00d2875f 905        data\animation\worker_axe_charged_release.txt
  00d288c3 24120      data\animation\worker_axe_release.aaf

Error: the compressed zlib/deflate input is wrong or incomplete (-3)
Info:  algorithm   1
       offset      00d288c3
       input size  0x0000384b 14411
       output size 0x00005e38 24120
       result      0xffffffff -1

Error: uncompressed data (-1) bigger than allocated buffer (24120)
       It usually means that data is not compressed or uses another algorithm

Last script line before the error or that produced the error:
  25  clog NAME OFFSET ZSIZE SIZE

- OFFSET       0x00d288c3
- ZSIZE        0x0000384b
- SIZE         0x00005e38
  coverage file 0     0%   257641     357102139  . offset 00d2c10e
  coverage file -1   18%   40206      220673     . offset 00009d0e


Inspecting a few bytes starting at 0x00D288C3, I get the following hex:

Code: Select all

78 9C 8D 9C 07 54 ...


It certainly looks like the start of a zlib compressed chunk, but clearly there is some sort of issue. Does anyone have any suggestions for how to get extraction working for this archive?

Relevant links:
  1. siege.qrk - The archive I'm failing to extract from, uploaded to MEGA
  2. fat_princess.bms - The BMS script I'm attempting to use
  3. Fat Princess (.QRK) - The original thread requesting a script for this archive format
LudaX
Posts: 2
Joined: Wed Oct 20, 2021 2:23 pm

Re: Fat Princess .QRK Archive - Failing to Completely Extract

Post by LudaX »

Update:

Of course, right after asking my question, I found at least one solution :oops: I was able to fully extract all the files by specifying the compression type as zlib_noerror:

# Fat Princess
# script for QuickBMS http://quickbms.aluigi.org

idstring "QRK\0"
comtype zlib_noerror
....


But I'm not sure if this is the most ideal approach, since from my understanding it ignores errors... Are there other better approaches than this, or is this the recommended one?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Fat Princess .QRK Archive - Failing to Completely Extract

Post by aluigi »

The file siege.qrk is no longer available.
Using zlib_noerror isn't a solution because it means the data can't be decompressed with zlib (probably a different compression) and what you will get is just the original compressed data (garbage)