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.

Decompress a file concatenated in an archive

Featured Replies

  • Author
  • Localization

Garo, posted Fri Apr 16, 2021 11:09 am (63398)


I made an archive called GGTX or gtx.

This is the BMS script to decompress it
Code:
comtype lzma2

idstring "GGTX"
get ZSIZE long
get SIZE long
get NAME basename
string NAME ".amg"
savepos OFFSET
clog NAME OFFSET ZSIZE SIZE


But I made an archive called PTK or UKTP162N, that uses this script
Code:
idstring "UKTP162N"
get FILES long
get NAMESZ long

for i = 0 < FILES
   getdstring NAME NAMESZ
   get OFFSET longlong
   get SIZE longlong
   log NAME OFFSET SIZE


For each subarchive in the archive, I want to specify the idstring "GGTX" and decompress the file with lzma2.
  • Author
  • Localization

aluigi, posted Fri Apr 16, 2021 9:42 pm (63407)


You can try something like the following:
Code:
idstring "UKTP162N"
get FILES long
get NAMESZ long

for i = 0 < FILES
   getdstring NAME NAMESZ
   get OFFSET longlong
   get SIZE longlong

    savepos TMP
    goto OFFSET
    getdstring SIGN 4
    if SIGN u== "GGTX"
        callfunction ggtx_unpack 1
    else
        log NAME OFFSET SIZE
    endif
    goto TMP
next i

startfunction ggtx_unpack
    comtype lzma2
    #idstring "GGTX"
    get ZSIZE long
    get SIZE long
    savepos OFFSET
    clog NAME OFFSET ZSIZE SIZE
endfunction
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.