The Witcher 2
Posted: Tue May 17, 2011 5:44 pm
The contents of this post was deleted because of possible forum rules violation.
What? their archive format looks nothing like unreal packages.chrrox wrote:I doubt this format will be supported they seem to have ripped off unreal engine's format without actually using the unreal engine.
Yes, I have not committed my code to my repository yet though.chrrox wrote:you got an extractor working?
Good newsRick wrote:Yes, I have not committed my code to my repository yet though.chrrox wrote:you got an extractor working?
Rick wrote:Yes, I have not committed my code to my repository yet though.chrrox wrote:you got an extractor working?
http://cia.vc/stats/project/redvoltagex wrote:Is it GitHub or something so I can subscribe to your commits?
Code: Select all
idstring DZIP
get unk01 long
get files long
get unk02 long
get tableoff long
goto tableoff
for i = 0 < files
get nsize short
getdstring name nsize
get unk03 long
get unk04 long
get size long
get null01 long
get offset long
get null02 long
get zsize long
get null03 long
log name offset zsize
next i
Code: Select all
while (i < input.Length)
{
var op = input[i++];
var control = (op >> 5) & 0x07;
if (control == 0)
{
// uncompressed blob
int length = 1 + (op & 0x1F);
Array.Copy(input, i, output, o, length);
i += length;
o += length;
}
else
{
int length;
if (control == 7)
{
length = 6 + input[i++];
}
else
{
length = control - 1;
}
length += 3;
int offset = (op & 0x1F) << 8;
offset |= input[i++];
offset = o - 1 - offset;
if (offset + length > o)
{
while (length > 0)
{
output[o++] = output[offset++];
length--;
}
}
else
{
Array.Copy(output, offset, output, o, length);
o += length;
}
}
}