HELP ME,to calculate zstd compression

Programming related discussions related to game research
TUNBudi06
Posts: 52
Joined: Tue Sep 14, 2021 7:40 am

Re: HELP ME,to calculate zstd compression

Post by TUNBudi06 »

Oh..,ok

Thanks
TUNBudi06
Posts: 52
Joined: Tue Sep 14, 2021 7:40 am

Re: HELP ME,to calculate zstd compression

Post by TUNBudi06 »

Oh..ok then,but do you know how to compile the bms script to internal quickbms script???


I mean,how to make quickbms have internal script??
Wrecker3000
Posts: 2
Joined: Tue Dec 07, 2021 7:14 am

Re: HELP ME,to calculate zstd compression

Post by Wrecker3000 »

TUNBudi06 Saw Your channel on telegram...I have also been modding pak files...your work with zstd is brilliant...i think I have the solution for your problem..check my message on telegram @wreckeradmin
Last edited by Wrecker3000 on Sat Dec 11, 2021 9:33 am, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: HELP ME,to calculate zstd compression

Post by aluigi »

http://aluigi.org/papers/quickbms.txt

Section:

Code: Select all

C] Modkit distribution of quickbms.exe


I hope you are going to make good use of that and respect the credits were due...
TUNBudi06
Posts: 52
Joined: Tue Sep 14, 2021 7:40 am

Re: HELP ME,to calculate zstd compression

Post by TUNBudi06 »

Oh..ok,i Will check that.bcz I just make the quickbms have internal script.thanks bro
Wrecker3000
Posts: 2
Joined: Tue Dec 07, 2021 7:14 am

Re: HELP ME,to calculate zstd compression

Post by Wrecker3000 »

Hey Aluigi, can you tell me which script to use for unpacking pak files in pubg mobile
TUNBudi06
Posts: 52
Joined: Tue Sep 14, 2021 7:40 am

Re: HELP ME,to calculate zstd compression

Post by TUNBudi06 »

Hi bro, can you explain further?

Bcz is that data(about hex below) i just find it on exe not in elf(for static Linux)


How to do it:

- open quickbms.exe with a hex editor
- search the string "SET THIS BYTE X TO 0x00"
- replace the 'X' (0x58) with a NULL (0x00):
53 45 54 20 54 48 49 53 20 42 59 54 45 20 58 20 SET THIS BYTE X
53 45 54 20 54 48 49 53 20 42 59 54 45 20 00 20 SET THIS BYTE

- upx.exe -9 quickbms.exe

- copy /b quickbms.exe + script.bms output.exe

That's all, anyway if you want to use the "classical" way and being
able to specify options, input file and output folder, it's better
to use the BAT solution with the -G option for the GUI mode:

EXTRACT.BAT:
quickbms.exe -G OPTIONS SCRIPT INPUT OUTPUT
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: HELP ME,to calculate zstd compression

Post by aluigi »

That feature is not available on Linux because the GUI mode exists on Windows only, for modders it's easy to tell users to just run an exe without having knowledge of what a script is.

On Linux you need to specify the input file and output folder in any case so it has absolutely no sense or advantage to embed a script... who needs that probably needs to write his own tools instead of relying on a general purpose big tool like quickbms.
TUNBudi06
Posts: 52
Joined: Tue Sep 14, 2021 7:40 am

Re: HELP ME,to calculate zstd compression

Post by TUNBudi06 »

Yah..,its ok
TUNBudi06
Posts: 52
Joined: Tue Sep 14, 2021 7:40 am

Re: HELP ME,to calculate zstd compression

Post by TUNBudi06 »

Hai aluigi,do you know how to calculate zlib??


Bcz some file in .pak in contain zlib and zstd compression


So do you can make it


IM sorry
Cause i don't know about the compression method and how to calculate??
TUNBudi06
Posts: 52
Joined: Tue Sep 14, 2021 7:40 am

Re: HELP ME,to calculate zstd compression

Post by TUNBudi06 »

Even,i read the documentation about format zlib
I still cant to understand that
Link: https://www.rfc-editor.org/rfc/rfc1950
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: HELP ME,to calculate zstd compression

Post by aluigi »

Deflate is the compression algorithm while zlib is a container of deflate data.
In short zlib is header+deflate+crc. There is no "magic" signature unlike zstd.

zlib data is ok to scan inside files due to the presence of the final crc that avoids the false positives.
I use offzip for scanning zlib:
https://aluigi.altervista.org/mytoolz.htm#offzip

For example:
offzip -a INPUT_FOLDER OUTPUT_FOLDER

The default scanner is zlib which does NOT get deflate.
deflate spits tons of false positives and therefore is not reliable, it's used if you specify the -z -15 option.
TUNBudi06
Posts: 52
Joined: Tue Sep 14, 2021 7:40 am

Re: HELP ME,to calculate zstd compression

Post by TUNBudi06 »

Oh ok,thanks again bro
nix132
Posts: 4
Joined: Fri Feb 18, 2022 6:05 pm

Re: HELP ME,to calculate zstd compression

Post by nix132 »

Can someone help me decompress the files in Arena of valor game?
TUNBudi06
Posts: 52
Joined: Tue Sep 14, 2021 7:40 am

Re: HELP ME,to calculate zstd compression

Post by TUNBudi06 »

IM not play that game