Read or post about compression. And decompression. Or ask questions how to decompress your files.
Patriot
n00b
Posts: 10 Joined: Sun Oct 04, 2009 5:37 pm
Has thanked: 2 times
Been thanked: 11 times
Post
by Patriot » Fri Oct 16, 2009 11:43 pm
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.
aluigi
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:
Post
by aluigi » Fri Oct 16, 2009 11:57 pm
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
Post
by Patriot » Sat Oct 17, 2009 12:13 am
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.
Patriot
n00b
Posts: 10 Joined: Sun Oct 04, 2009 5:37 pm
Has thanked: 2 times
Been thanked: 11 times
Post
by Patriot » Sat Oct 17, 2009 12:27 am
I receive
"- open input file : -15 "
"Error : No such file or directory"
I am using version 0.3.3 from
here
aluigi
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:
Post
by aluigi » Sat Oct 17, 2009 12:51 am
recheck the arguments and the spaces between them, seems that you have missed one:
Patriot
n00b
Posts: 10 Joined: Sun Oct 04, 2009 5:37 pm
Has thanked: 2 times
Been thanked: 11 times
Post
by Patriot » Sat Oct 17, 2009 1:02 am
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?
aluigi
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:
Post
by aluigi » Sat Oct 17, 2009 1:39 pm
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