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.

How to add automatic "/x00" to fill a line

Featured Replies

  • Author
  • Localization

Insoumius, posted Fri Jun 24, 2016 2:36 pm (14729)


Hi everyone ive got a doubt. I used a script on QBMS but it generate files, but all got different sizes and finish with different types of lenghts, and i need to all files to get "x---0" size (fill the last line with x00 if necesary)

What lines can i add to the code and where i must add to fill last line?


Example:
Normal with the plugin:
5F C4 F6 FF FF F6 DA FB F6 5B C2 F6 27 9E 80 D9
80 3C 0D B3 80 01 80 EC 00 10 0E EC EC EC D9 3F
EC D9

New 1:
5F C4 F6 FF FF F6 DA FB F6 5B C2 F6 27 9E 80 D9
80 3C 0D B3 80 01 80 EC 00 10 0E EC EC EC D9 3F
EC D9 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Old size: 0x22
New size: 0x30
  • Author
  • Localization

aluigi, posted Fri Jun 24, 2016 2:39 pm (14730)


If these bytes (padding) already exist in the original stored file (in the archive) then it's enough to align the SIZE by using:
math SIZE x 0x10
log NAME OFFSET SIZE

If these bytes are not available in the archive then try using a mix of comtype COPY clog:
comtype copy
math XSIZE = SIZE
math XSIZE x 0x10
clog NAME OFFSET SIZE XSIZE
  • Author
  • Localization

Insoumius, posted Fri Jun 24, 2016 3:16 pm (14735)


I'm using this script for byte pair encoding
http://zenhax.com/viewtopic.php?f=13&p=13177#p13195

With a little modifications to not change name and only change file type

Code:
comtype bpe_compress
get SIZE asize
clog MEMORY_FILE2 0 SIZE SIZE
get ZSIZE asize MEMORY_FILE2
log MEMORY_FILE 0 0
put SIZE long MEMORY_FILE
put ZSIZE long MEMORY_FILE
append
log MEMORY_FILE 0 ZSIZE MEMORY_FILE2
append
get SIZE asize MEMORY_FILE
get NAME basename
string NAME ".FLT"
log NAME 0 SIZE MEMORY_FILE


And generally i use Advanced Renamer to put numbers on the files but that is other thing
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.