The Forum is up for sale: XeNTaX Forum looking for new owner

[Xbox360] Forza 2 Files

Read or post about compression. And decompression. Or ask questions how to decompress your files.
Post Reply
Patriot
n00b
Posts: 10
Joined: Sun Oct 04, 2009 5:37 pm
Has thanked: 2 times
Been thanked: 11 times

[Xbox360] Forza 2 Files

Post by Patriot »

Forza 2 user files seem to be compressed and I can't figure out the format. There appears to be a null terminator for every file at the end of the compressed block.

.liv struct

Code: Select all

int32 compressedlen
int32 decompressedlen
byte  data_compressed[compressedlen]
.xdc struct

Code: Select all

byte Header[0x0F]
int32 compressedlen
int32 decompressedlen
byte data_compressed[compressed]
You do not have the required permissions to view the files attached to this post.
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: [Xbox360] Forza 2 Files

Post by aluigi »

it contains a classical deflated block but it's not at a fixed position.
for example in 71.liv it's at offset 8, in 79.liv at offset 7 and in Thumbnail_1.xdc at offset 0x17 so it's probably necessary to use offzip (with -z -15) or a similar tool to unpack the files
Patriot
n00b
Posts: 10
Joined: Sun Oct 04, 2009 5:37 pm
Has thanked: 2 times
Been thanked: 11 times

Re: [Xbox360] Forza 2 Files

Post by Patriot »

I receive an error using offzip.

"zlib initialization error"

I also tried to code an app using deflate and I get an error there too.

Actually, I don't quite understand how to use offzip. I get a lot of errors.
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: [Xbox360] Forza 2 Files

Post by aluigi »

I have used:
offzip -a -z -15 c:\71.liv c:\ 0
Patriot
n00b
Posts: 10
Joined: Sun Oct 04, 2009 5:37 pm
Has thanked: 2 times
Been thanked: 11 times

Re: [Xbox360] Forza 2 Files

Post by Patriot »

I receive
"- open input file : -15 "
"Error : No such file or directory"

I am using version 0.3.3 from here
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: [Xbox360] Forza 2 Files

Post by aluigi »

recheck the arguments and the spaces between them, seems that you have missed one:

Code: Select all

offzip -a -z -15 c:\71.liv c:\ 0
Patriot
n00b
Posts: 10
Joined: Sun Oct 04, 2009 5:37 pm
Has thanked: 2 times
Been thanked: 11 times

Re: [Xbox360] Forza 2 Files

Post by Patriot »

ok thanks a lot


How would i go about implementing that into my own app? As in which functions in the source would i use?
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: [Xbox360] Forza 2 Files

Post by aluigi »

it's a scanning function so it's not that easy to implement like calling one function.
you should call inflate various times with the sequential data taken from the file so read the zlib manual for all the details
Post Reply