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 LZSS encoder

Featured Replies

  • Author
  • Localization

Mirakichi, posted Fri Aug 10, 2018 1:34 pm (37392)


Hi aluigi, I've found this LZSS encoder in the net https://drive.google.com/file/d/1Opgvyn ... p=drivesdk and it seems he is used by quickbms to support the LZSS algorithm. I want to use this encoder to recompress a graphics archive, this graphics archive is the "LESS20" file included in the link, and the "LESS20.LED" is the LESS20 decompressed.

I use an bms script to decompress the "LESS20", the encoder recompress the "LESS20.LED" to "LESS20" again, but when I edit the textures, same keeping the original size, the encoder do not recompress.

The source code of this encoder is included, I would like to know if can adapt this encoder to compress the LESS20.LED with the edited textures to LESS20 again, since it is used by quickbms.
In the link I've included two bms scripts that I use to decompress the LESS20 and to dump the textures and reimport them. Altough the encoder create the new encoded file, after decompress, the modified texture is no there.
  • Author
  • Localization

aluigi, posted Sat Aug 11, 2018 1:14 am (37414)


That format is a bit more complicated than just compressing and decompressing a file, there is a header and moreover chunks as visible in less.cpp.

Anyway I guess the problem of the script is the following:
Code:
    savepos TMP
    goto DATA_OFFSET
    do
        get CHECK byte
    while CHECK == 0
    goto -1 0 seek_cur
Replace it with "padding 16" and it may work (not tested, limited time)
  • Author
  • Localization

Mirakichi, posted Sat Aug 11, 2018 12:41 pm (37423)


Hi, I've tried replace here, but I don't know where is the "padding" in the script to update with 32, can you update for me, please?
  • Author
  • Localization

aluigi, posted Sat Aug 11, 2018 2:31 pm (37425)


eh???
Anyway I have seen your same topic on encode.ru and it was very confusing there too so probably it's better if you continue there.
  • Author
  • Localization

Mirakichi, posted Sat Aug 11, 2018 4:47 pm (37427)


I am need so much of this tool, because this I've searched for a solution in 2 sites, here in the Zenhax and in the encode.ru. If this last site cannot help me, I can still count on your help?
  • Author
  • Localization

aluigi, posted Tue Aug 14, 2018 1:13 pm (37503)


If it's a problem with quickbms or a script sure, but I don't think it's the case because there you want to rebuild a format (quickbms is good for extraction and reimporting, not building).

If it's a problem with that C code I prefer to stay away from it :D (time reasons)
  • Author
  • Localization

Mirakichi, posted Tue Aug 14, 2018 3:50 pm (37514)


Hi aluigi, the Shelwien has show to me a new way to use the LZSS recompressor and is working perfectly with the modified textures in the game, but the quickbms and the script is a crucial tool to the reimport the textures before recompression and to decompress the LESS archives, so I am using the two tools in my translation, each one with an specific purpose.
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.