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

zlib problem?

Read or post about compression. And decompression. Or ask questions how to decompress your files.
Post Reply
Cryptonia
advanced
Posts: 46
Joined: Wed Aug 19, 2009 5:11 pm

zlib problem?

Post by Cryptonia »

hi i have a problem

also i want to change some files in a games whos use it


also i exact with offzip the zlib data(zlibed and unpacked)

so and for a test i recompresed the file but my problem is, file is bigger than the orginal, and this is shit when i must inject them later for change the textures in the game

the samples

orginal zlib
mypacket zlib
unpacked file
http://www.xup.in/dl,19742179/dir.7z/
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: zlib problem?

Post by aluigi »

the problem is that zlib is not so good for compressing because even setting the max factor (9) its result will be ever not much optimized in terms of size.
for example the implementation of the zlib inflate adopted by 7-zip is a lot more optimized.

I found the same problem of the low results of zlib when I wrote my packzip tool and was really very very irritating.
Cryptonia
advanced
Posts: 46
Joined: Wed Aug 19, 2009 5:11 pm

Re: zlib problem?

Post by Cryptonia »

Bugtest wrote:the problem is that zlib is not so good for compressing because even setting the max factor (9) its result will be ever not much optimized in terms of size.
for example the implementation of the zlib inflate adopted by 7-zip is a lot more optimized.

I found the same problem of the low results of zlib when I wrote my packzip tool and was really very very irritating.

yap am frind had this problem ² but inject bigger files than orginal is shit like u overwritte existing data from other data


7zip support zlib? how`?

i packed the file with 7zip to the zip format and got the smaler file
brienj
VIP member
VIP member
Posts: 288
Joined: Mon May 02, 2005 1:48 pm
Location: Louisville, KY
Has thanked: 10 times
Been thanked: 70 times
Contact:

Re: zlib problem?

Post by brienj »

IDK if this will help you, but I felt I had to try and help you, because thanks to you, I found out about the Offzip program. Many thanks for that. But anyway, download this tool:

http://www.parkenet.com/apl/ZlibToolDemo.htm

You can set the compression level you want easily when recompressing a file. Try setting it to the max, which is 9. I have only had a few times that I could not compress a file smaller than the original one I was replacing. If that still won't compress enough for you, there are some other tricks to try, especially if it is a DDS file. I hope it works for you. :)

Edit: I went ahead and downloaded your files and was able to expand your compressed file, then I compressed it with the max compression and it compressed down to 1.86MB, which is a little bigger than your needed 1.85MB, if I get some extra time, I'll see if I can get that down for you.
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Re: zlib problem?

Post by Mr.Mouse »

Hey brienj! Good to see you! ;)
brienj
VIP member
VIP member
Posts: 288
Joined: Mon May 02, 2005 1:48 pm
Location: Louisville, KY
Has thanked: 10 times
Been thanked: 70 times
Contact:

Re: zlib problem?

Post by brienj »

Mr.Mouse wrote:Hey brienj! Good to see you! ;)
Hey, thanks.
Cryptonia
advanced
Posts: 46
Joined: Wed Aug 19, 2009 5:11 pm

Re: zlib problem?

Post by Cryptonia »

well this 1.86 mb i not the problem we get the same size but its must smaler or same size

with dds and mipmap i know this trick but like on wav is this method a little shit okay delet 2 ms from it will work i think
brienj
VIP member
VIP member
Posts: 288
Joined: Mon May 02, 2005 1:48 pm
Location: Louisville, KY
Has thanked: 10 times
Been thanked: 70 times
Contact:

Re: zlib problem?

Post by brienj »

Cryptonia wrote:well this 1.86 mb i not the problem we get the same size but its must smaler or same size

with dds and mipmap i know this trick but like on wav is this method a little shit okay delet 2 ms from it will work i think
I did not even notice there was a wav file in there, but taking off that much from the wav file prolly would do it. Also, in the text part, if there are some letters that you can change, to be the same letters, or especially if you can remove any unneeded spaces, that would help compression. Actually, any repetitive values in the whole file will help compression. You have very little to have to shrink it, you should easily be able to do it. Good luck!

Thanks again for mentioning the Offzip program, it is exactly the type of program I have been dreaming about, and it even came with source code. I love it. :)

BTW, thanks to this program, I may be posting some pics of some hacks I might be doing on some Xbox 360 games. Before I had this program, I didn't have the motivation to do everything by hand in a hex editor. Funny that such a small little command-line program can make me be so happy. :D
Post Reply