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 unknown compression in Sengoku Basara 2

Featured Replies

  • Localization

Hi guys, someone can create for me a decoder to decode this file or maybe a bms script?
https://drive.google.com/file/d/12SOsJxcs7536JSJ2iv_nbcAJL7SUopim/view?usp=drive_link
There is some visble strings of uncompressed content. The original algorithm is the yz2, but this game version uses a custom compression, maybe an lzss variant. I have the encoder and decoder for the yz2, but for this game the yz2 compression has been replaced with a custom compression as I said.

I can read the zsize and unpacked size fields from header with this C code:
#include <stdio.h>
#include <stdint.h>

int read_header(FILE *fp, uint32_t *packed_size, uint32_t *unpacked_size)
{
char hdr[33];

if (fread(hdr, 1, 32, fp) != 32)
return -1;

hdr[32] = '\0';

unsigned int a, b;

if (sscanf(hdr, "%x%x", &a, &b) != 2)
return -1;

*packed_size = a;
*unpacked_size = b;

return 0;
}

Edited by Alpha 1001

Solved by Alpha 1001

  • 3 weeks later...

Create an account or sign in to comment

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.