Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Help with OFFZIP tool

Featured Replies

  • Author
  • Localization

Eldinen, posted Mon Jan 28, 2019 4:42 pm (42875)


Hi everyone!

I have an issue with offzip tool using this file (the extension does not matter):


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!

ui_title_1.bms

  • Author
  • Localization

aluigi, posted Mon Jan 28, 2019 8:46 pm (42885)


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
  • Author
  • Localization

Eldinen, posted Tue Jan 29, 2019 9:31 pm (42939)


Thank you so much! It works perfectly!
Yeah, it was very slow hehe.

This issue is solved!
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.