ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Tue Oct 22, 2019 9:16 pm

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Help with OFFZIP tool
PostPosted: Mon Jan 28, 2019 4:42 pm 

Joined: Fri Apr 28, 2017 10:48 am
Posts: 10
Hi everyone!

I have an issue with offzip tool using this file (the extension does not matter):
Attachment:
ui_title_1.bms [1.23 MiB]
Downloaded 31 times


I have decompressed the file using "offzip -a ui_title_1.bms folder" getting:

1 valid compressed streams found
- 0x0013a26d -> 0x00800000 bytes covering the 100% of the file

So it was perfect, I can see the raw texture this file has, I was so happy,
then I tried to recompress the file, "offzip -a -r ui_title_1.bms folder" getting

- 1 valid compressed streams found
- 0x0013a26d -> 0x00800000 bytes covering the 100% of the file
- 1 files reimported

So I guessed the file was reimported, and ready to use inside of the game but,
before that, I tried to do "offzip -a ui_title_1.bms folder" again with the new ui_title_1getting:

- zlib Z_DATA_ERROR, the data in the file is not in zip format
or uses a different windowBits value (-z). Try to use -z -15

0x0013a000

- 1 valid compressed streams found
- 0x000ff8ff -> 0x00800000 bytes covering the 81% of the file

So I guess that compression was not ok because the file has changed now.
And if I use -z -15 instead of -z 15 from the beginning, then I get a bigger error.

I hope someone can help me!


Top
   
PostPosted: Mon Jan 28, 2019 8:46 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10809
The good news is that everything is ok.
The error you see there is referred to the original data of the file located after the new compressed data.
Code:
####################XXX
|                   |
|                   old data, because our new data is smaller
recompressed data
The zopfli compression with the options used in offzip is extremely slow, that's the real problem :)

Your file is 100% compressed without headers and tails so you can use a simple script for decompressing and recompressing it:
Code:
get SIZE asize
get NAME basename
get EXT extension
if EXT == "z"
    comtype zlib_noerror
else
    comtype zlib_compress
    string NAME + ".z"
endif
clog NAME 0 SIZE SIZE


Top
   
PostPosted: Tue Jan 29, 2019 9:31 pm 

Joined: Fri Apr 28, 2017 10:48 am
Posts: 10
Thank you so much! It works perfectly!
Yeah, it was very slow hehe.

This issue is solved!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited