Users browsing this thread:
help with ZLIB files
#1
Question 
Howdy! so I'm ripping from an online and still up and running flash game called Animal Jam Classic and I've been having trouble with certain files. So AJClassic doesn't have a master file for every asset instead everything is only gonna be in the cache but anyway. So I've been able to find certain assets but a ton of files are unopen able in both JPEXS and ASV becuz they're simply not not SWF files lol. These files didn't have a specific file extension to em so I put em through TrID and found out they're ZLIB files.
ANYWAY to not run this any longer ive been looking into how to decompress these files and i haven't been having great luck so i was wondering if there was anyone with better insight on ZLIB files could help me
Couple last things, I've viewed the ZLIB website and to my knowledge its just a software library. Ive tried looking and decompressing with python and c++ but im not a programmer so i haven't been successful with that, and lastly i also tried opening it with HSFExplorer but i couldnt get that to work lol.
I hope i layed that out well enough, thanks so much if you're able to help ill take even the smallest amount of insight please!


-Worm
Reply
Thanked by:
#2
hey! offzip works a charm for me. Just run offzip -a (file) and you're good to go!

anyways here's an optional bit of zlib explaining, feel free to skip:

Zlib isn't really meant to be used as a proper file format like your .zip and .rar files, rather, it's meant to be used as a building block to put inside your game/program/whatever. it's mature, stable, and open-source in a way that doesn't pose a lot of legal challenges. I see it a lot when reverse engineering custom formats in LeapFrog games, simply because it's a stable, fast open-source compression solution that runs well on the dinky little ARM CPUs* that mobile platforms have.

hopefully that's a good explanation of things, I'm not an expert or anything...

*: this isn't shaming ARM or anything, I am well aware that they are absolute powerhouses today. Keep in mind that you play kids games on these things, not GTA V.
applecuckoo - ripper of sounds, sprites and models

Places to get help:
tSR Discord - This is where most of the ripping experts on the VG Resource hang out these days, so you should probably start here. Any requests to rip stuff (i.e. "Please rip sounds/models/sprites from game X!") are only allowed here as per the rules.

ResHax forum - Another forum that is home to most of the reverse engineers who were on the old ZenHax and XenTax forums. A great place to get help for any mysterious files. I'm also there under the same username.

And remember, always upload example files. That way, people don't have to dig in and fetch them for you.
Reply
Thanked by:
#3
(03-13-2025, 01:49 AM)applecuckoo Wrote: Ooo thank you! Offzip seems to crash whenever i try to open it tho? So not sure if u have any insight on that.
Thanks for the extra info as well!! Very interesting Cute!  
Reply
Thanked by:
#4
(03-13-2025, 12:49 PM)0worm0aj Wrote: Ooo thank you! Offzip seems to crash whenever i try to open it tho? So not sure if u have any insight on that.
Thanks for the extra info as well!! Very interesting Cute

offzip is meant to be used from the command line, it doesn't have a GUI. I'd suggest moving the files you'd like to extract to the same directory that offzip lives in, then open Terminal in that folder and type offzip -a (filename).
applecuckoo - ripper of sounds, sprites and models

Places to get help:
tSR Discord - This is where most of the ripping experts on the VG Resource hang out these days, so you should probably start here. Any requests to rip stuff (i.e. "Please rip sounds/models/sprites from game X!") are only allowed here as per the rules.

ResHax forum - Another forum that is home to most of the reverse engineers who were on the old ZenHax and XenTax forums. A great place to get help for any mysterious files. I'm also there under the same username.

And remember, always upload example files. That way, people don't have to dig in and fetch them for you.
Reply
Thanked by: 0worm0aj
#5
(03-12-2025, 08:18 PM)0worm0aj Wrote: i was wondering if there was anyone with better insight on ZLIB files could help me
There's no such thing "ZLIB files". ZLIB is just a compression codec (the de-facto standard implementation of the "deflate" codec, see RFC1951).

To use this codec in a file, one would need a container format. Several of these exists, the first bytes would tell:
- 'P', 'K': it is a ZIP container (with method 8), try 7zip in this case.
- 0x1F, 0x8B: it is a GZIP container, try gzip for Windows.
- 0x78, 0x01 or 0x78, 0x5C or 0x78, 0x9C or 0x78, 0xDA: these are 2 bytes ZLIB prefixes to the deflate stream (specific to the ZLIB library alone, not part of the compressed data).

(03-12-2025, 08:18 PM)0worm0aj Wrote: Ive tried looking and decompressing with python and c++ but im not a programmer so i haven't been successful with that
Try prefixing the deflate stream with the two bytes 0x78, 0xDA before you pass it to python's decompressor routine. Or try to remove the first two bytes if the former doesn't work. No guarantees, but might get lucky.
Reply
Thanked by: 0worm0aj


Forum Jump: