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.

Extract/deflate zlib without knowing extracted size

Featured Replies

  • Author
  • Localization

happydance, posted Sat Feb 18, 2017 5:27 pm (20874)


is it possible to create a bms script Extract/deflate zlib without knowing extracted size like how offzip works? I cant use offzip since some files are not extracted properly (some are cut) and the TOC is encrypted and I got no clue how to decrypt it.

I tried this, jus by giving it a big extract files, it works with some but fails on most

Code:
log MEMORY_FILE 0 0
clog MEMORY_FILE OFFSET ZSIZE 0x1000000
GetDString EXT 0x3 MEMORY_FILE
string NAMEZ p= "%s_d.%s" NAME i EXT
get EXTRACT_SIZE ASIZE MEMORY_FILE
log NAMEZ 0 EXTRACT_SIZE MEMORY_FILE


not sure if there is a proper computation to be done, can anyone help?
  • Author
  • Localization

happydance, posted Sun Feb 19, 2017 10:51 am (20879)


Never mind... it seems the zsize im giving it is wrong and I really need to decrypt the TOC to get the proper zsize, size and offsets

any idea where should I start to decrypt the TOC of this file format?
  • Author
  • Localization

aluigi, posted Mon Feb 20, 2017 11:48 am (20893)


Regarding the decompression with unknown compressed/decompressed size, use: comtype unzip_dynamic
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.