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! I have no idea how to create a compression script for QuickBMS!

Featured Replies

  • Author
  • Localization

CommanderVideo, posted Wed Nov 10, 2021 5:25 am (67453)


I found a decompression script for a Wii game, so I decided to use it in quickbms to extract the game files, but after I had finished altering them and was ready to recompress them so that I could play the game, I realized that i had no idea how to actually recompress them in the first place. The script that I used to decompress them is:
Code:
get name FILENAME
get zsize asize
comtype lz77wii
clog name 0 zsize zsize


I've been googling for hours and tinkering with the script, but nothing I do compresses the files the same way that they were compressed before. Any help would be much appreciated. :)
  • Author
  • Localization

aluigi, posted Wed Nov 10, 2021 10:16 am (67454)


If you replace lz77wii with lz77wii_compress it will become a compressor script.

The problem is that lz77wii is more like a format including various algorithms rather than being an algorithm itself, that means the game may not be able to read the compressed file (for example because the algorithm chosen by quickbms isn't the one supported by the game).

So, keep your expectations very low.
  • Author
  • Localization

CommanderVideo, posted Fri Dec 03, 2021 12:02 am (67810)


aluigi wrote:
If you replace lz77wii with lz77wii_compress it will become a compressor script.

The problem is that lz77wii is more like a format including various algorithms rather than being an algorithm itself, that means the game may not be able to read the compressed file (for example because the algorithm chosen by quickbms isn't the one supported by the game).

So, keep your expectations very low.


Wait, so lz77wii contains multiple different algorithms and quickbms just chooses one? In that case, is there a way I can manually choose the algorithm that it uses and (hopefully) find the one supported by the game through trial and error?

Sorry for the slow reply by the way :p
  • Author
  • Localization

aluigi, posted Fri Dec 03, 2021 12:30 pm (67834)


I checked the source code of quickbms and apparently it can be done very easily:
Code:
comtype lz77wii_compress 0x00 # copy
comtype lz77wii_compress 0x10 # lzs
comtype lz77wii_compress 0x11 # lzx (default)
comtype lz77wii_compress 0x20 # huffman
comtype lz77wii_compress 0x40 # lzx (default)
comtype lz77wii_compress 0x654c # lze
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.