Making a simple zlib BMS script?

Textures, recreate headers, conversions, algorithms and parsing of image files
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Making a simple zlib BMS script?

Post by sigroon365 »

Hi. Sample file can unzip by offzip. However, it there a way to zip unziped file?
I mean how to zip 'unzipped file' to original zipped file by bms script.

Here is sample file https://drive.google.com/file/d/0B8JGJb-FRy_bX0tZUTlhLW10MFU/view?usp=sharing
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Making a simple zlib BMS script?

Post by aluigi »

Try this script (version 0.1.1) for the extraction:
http://aluigi.org/bms/cws2fws.bms
Being a Flash file you don't need to recompress it.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Making a simple zlib BMS script?

Post by sigroon365 »

aluigi wrote:Try this script (version 0.1.1) for the extraction:
http://aluigi.org/bms/cws2fws.bms
Being a Flash file you don't need to recompress it.


Thanks for your reply. The reason that I need to recompress the file is size problem.
Here is sample. https://drive.google.com/file/d/0B8JGJb-FRy_bQ3hKTEs0cGx6NFE/view?usp=sharing

I just open origin file from the program and save it without modification. https://www.free-decompiler.com/flash/download/ However, the output size is bigger than the original file. And it causes crash on the game.

And saved file doesn't work with BMS script. But it can be unpacked by offzip and the unzziped file is the same those of origin_unzipped file.

I need to use the above program for modifying the file. But the zip size make me problem.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Making a simple zlib BMS script?

Post by sigroon365 »

Hmm.. I found that the original file's zlib is different from normal zlib.
I tried to comtype_scan but I don't know what type is it.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: Making a simple zlib BMS script?

Post by sigroon365 »

Ah, I found that the problem is checksum. http://zenhax.com/viewtopic.php?p=12732#p12732