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.

quickbms src included/lzss.c questions

Featured Replies

  • Author
  • Localization

garan, posted Thu Mar 10, 2022 2:18 pm (70420)


can i supply parameters with a 0 if i dont want to use any parameters? and how will i get outsz? also im dealing with namco museum remix lzss files, should i change init_chr to '\0'? (line 300 of included/lzss.c)
Code:
int lzss_compress(u8 *in, int insz, u8 *out, int outsz, u8 *parameters)
  • Author
  • Localization

rabatini, posted Thu Mar 10, 2022 3:27 pm (70421)


garan wrote:
can i supply parameters with a 0 if i dont want to use any parameters? and how will i get outsz? also im dealing with namco museum remix lzss files, should i change init_chr to '\0'? (line 300 of included/lzss.c)
Code:
int lzss_compress(u8 *in, int insz, u8 *out, int outsz, u8 *parameters)


http://aluigi.org/bms/namco_museum.bms
  • Author
  • Localization

aluigi, posted Fri Mar 11, 2022 2:00 pm (70437)


@garan
As far as I understand you want to make a tool for decompressing the SSLZ/LZSS files of that format.

Since it's just a simple lzss with init_chr set to 0 you don't need quickbms or the lzss.c in quickbms, you can use any of the many lzss source code available for any language (as long as the settings are the same) and write your own tool in few lines.

Anyway if you want to use lzss.c from quickbms you can remove any reference/operation to "parameters" and then replacing ' ' in the two init_chr (static and lzss_init) with 0.
  • Author
  • Localization

garan, posted Sun Apr 03, 2022 9:28 pm (70842)


.

how should i use lzss.c?
i changed the parameters, messed with init_chr and removed references to `parameters` but i dont know how i should go about compressing memory.
how will i obtain `outsz` mentioned in the lzss_compress function declaration?
  • Author
  • Localization

aluigi, posted Mon Apr 04, 2022 12:06 am (70844)


out is the output buffer, outsz is its size.
Usually out/outsz must have the same size of the input buffer, better if slighly bigger in case the input can't be compressed.
Example:

outsz = insz;
out = malloc(outsz);
outsz = lzss_compress(in, insz, out, outsz);
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.