FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   new to this (https://fileforums.com/showthread.php?t=105583)

Neuromancer815 13-11-2022 12:43

new to this
 
hello, im trying to get into repacking games for the first time ever, for my own private use. i have a very slow wifi where i live and its always a pain to download anything larger than a few gigs. so what i wanna do is compress the games im currently not playing for later use. ive been directed to this forum as a great resource to help me get started, and ive been looking through the sticky for a few days now and id be lying if i said it wasnt very overwhelming, especially since i know absolutely nothing about compression and repacking. i am willing to put the time and effort to learn but im really not sure where to even start? id very grateful if i could get some guidance as to where i need to start this process. currently all i have done besides reading the stickies is downloaded this <http://freearc.org/download/0.666/FreeArc-0.666-win32.exe> and this <https://jrsoftware.org/isdl.php#stable>. i have tried compressing a game, sniper elite 4 to be exact, since i dont have any smaller games to test on but after seeing how much time it was gonna take i aborted it for the sole reason of not being able to use my pc for that duration and not knowing whether or not it was gonna work

KaktoR 13-11-2022 13:42

Depends on how much you want to size down your games. Generally spoken: The stronger the compression, the more time will it take and also CPU/RAM resources, to be simple.

To get the "quick and easy way" you can use DiskSpan_GUI to compress your files.
You can also unpack your compressed archives with it too (Tools -> Unpacker).

In your example for "Sniper Elite 4" I guess you can just use srep+lolz if you want it strong, with cost of speed and pc resources, or srep+lzma with cost of compression ratio, but requires way less pc resources. But I didn't checked the game so I cannot tell you for sure.

Some games requires that you first unpack the files and then compress them. In most cases you use xtool to unpack the game files, but you should know what compression method the game is compressed with. For example "Sniper Elite 5" is compressed with zlib (if I remember well), so you have to use xtool first to unpack the files, then apply srep to get rid of duplicates, then use lolz or lzma to use final compression.

Maybe you have noticed the problem for "newbies" here. That's nothing to explain in a few sentences.

Neuromancer815 13-11-2022 14:35

thanks kaktor for the reply, helped understand a few things i was held up on, i got "srep+7zip multi volume" and "lzma" from the stickies as well as diskspan GUI, but i followed the link to lolz to krinkles.org and it seems i need to post stuff there before i can get download righs which sucks because i dont know anything so what would i post about. also diskpan gui is being flagged as malware, is that a false flag?

Cesar82 13-11-2022 15:28

1 Attachment(s)
Quote:

Originally Posted by Neuromancer815 (Post 499095)
thanks kaktor for the reply, helped understand a few things i was held up on, i got "srep+7zip multi volume" and "lzma" from the stickies as well as diskspan GUI, but i followed the link to lolz to krinkles.org and it seems i need to post stuff there before i can get download righs which sucks because i dont know anything so what would i post about. also diskpan gui is being flagged as malware, is that a false flag?

If DiskSpan GUI was flagged as a virus it is a false positive.
You can download without worries.
If you need to, disable your antivirus and after extracting the zip file from DiskSpan GUI, enable your antivirus again and check the extracted folder from DiskSpan GUI. Let me know exactly which file was captured by your antivirus so that if there is an alternative version maybe I can replace the captured file.

NOTES:
DiskSpan GUI already includes all compressors reported by KaktoR, such as LOLZ.

EDIT: DiskSpan GUI is only False positive for viruses.
No virus detection using Kasperky Internet Security (See attached video below).

Neuromancer815 15-11-2022 14:24

Hey Cesar82 thanks for the reply, i did what you said; Affected files:

containerfile: C:\Users\Neuromancer\Downloads\DiskSpan_GUI v2.0.1.3 (x64).7z

file: C:\Users\Neuromancer\Downloads\DiskSpan_GUI v2.0.1.3 (x64).7z->COMPRESSOR/Resources/TOOLS/WemTool/WemTool.exe

webfile: C:\Users\Neuromancer\Downloads\DiskSpan_GUI v2.0.1.3 (x64).7z|https://fileforums.com/attachment.ph...30245021635373

EDIT: after using the program for a bit i just wanna say great work i love the UI and the program is vey easy to use

Cesar82 16-11-2022 18:30

Quote:

Originally Posted by Neuromancer815 (Post 499108)
Hey Cesar82 thanks for the reply, i did what you said; Affected files:

containerfile: C:\Users\Neuromancer\Downloads\DiskSpan_GUI v2.0.1.3 (x64).7z

file: C:\Users\Neuromancer\Downloads\DiskSpan_GUI v2.0.1.3 (x64).7z->COMPRESSOR/Resources/TOOLS/WemTool/WemTool.exe

webfile: C:\Users\Neuromancer\Downloads\DiskSpan_GUI v2.0.1.3 (x64).7z|https://fileforums.com/attachment.ph...30245021635373

EDIT: after using the program for a bit i just wanna say great work i love the UI and the program is vey easy to use

Thanks for the test.
If possible download the WemTool file attached in the post HERE and let me know if your anti-virus also captures this updated version without UPX compression.

Masquerade 17-11-2022 02:50

Sorry about the WemTool. It's probably going to trigger AV anyway because it's lazily built with bat2exe.

Neuromancer815 17-11-2022 08:08

Quote:

Originally Posted by Cesar82 (Post 499117)
Thanks for the test.
If possible download the WemTool file attached in the post HERE and let me know if your anti-virus also captures this updated version without UPX compression.

yes this one also gets flagged

shazzla 17-11-2022 08:15

Try compress using ASPack or MPress. Maybe it works.

Masquerade 17-11-2022 08:23

Quote:

Originally Posted by shazzla (Post 499123)
ASPack

ASPack will be even worse for detections.

shazzla 17-11-2022 08:51

Quote:

Originally Posted by Masquerade (Post 499124)
ASPack will be even worse for detections.

You mean ASProtect ?!

Cesar82 17-11-2022 10:56

Quote:

Originally Posted by Masquerade (Post 499119)
Sorry about the WemTool. It's probably going to trigger AV anyway because it's lazily built with bat2exe.

Thanks for info!
Is there no other way or program you can use to convert your BAT that doesn't create false positives?

Masquerade 17-11-2022 14:20

Probably could re-write the entire thing in C# but I'm currently so busy trying to balance a lot of IRL stuff I will not get time. It's something I will consider but it won;t be soon.

Crimzan 25-11-2022 13:00

Hello! Thank you for these explanations!

I'm also really new to this and I have read a lot but it is a lot of arbitrary seeming detailed information in these forums that make it incredibly hard to categorize and make sense of, so I have a lot of questions and I hope it's ok to just dump them all at once :o

I downloaded DiskSpan GUI, it seems like it's one of the more customizeable, yet very easy to use ones. Do you think this is a good tool to use or would I be better off using these exe's separately, or even a completely different software?

Quote:

Originally Posted by KaktoR (Post 499094)
In your example for "Sniper Elite 4" I guess you can just use srep+lolz if you want it strong, with cost of speed and pc resources, or srep+lzma with cost of compression ratio, but requires way less pc resources.

You said "srep+lolz" and "srep+lzma", does this mean, in DiskSpan GUI (if you are familiar with the software), I can select both srep first and then lolz / lzma and then it is basically what you had described?

To understand the logic behind this, when I select a folder to compress with DiskSpanGUI, "srep+lolz" would basically mean using srep first to deduplicate, and then compress the srep output with lolz?

I don't have Sniper Elite 4, but this is interesting -- how do you know srep+lolz is strong? Is it one of the strongest general combinations? Or how do you know, or in other words, how can I find out what compressors and thingies work the best?

Quote:

Originally Posted by KaktoR (Post 499094)
Some games requires that you first unpack the files and then compress them. In most cases you use xtool to unpack the game files, but you should know what compression method the game is compressed with. For example "Sniper Elite 5" is compressed with zlib (if I remember well), so you have to use xtool first to unpack the files, then apply srep to get rid of duplicates, then use lolz or lzma to use final compression.

Super interesting!
So, to make sure I understand what you said at the end, in DiskSpanGUI I would basically have xTool_zlib+srep+lolz (or lzma), is that correct?

Also how do you know it's compressed with zlib? Are you an experienced file magician and / or do you know of a scanner software that can test if a file is compressed, and what it is compressed with?

One final question, which is hopefully not too broad: What is your workflow finding 'the best' compression combinations (that is, not as slow as paq compression for instance but still really good compression ratio)? Is it Trial and Error? Like, do you just select a couple of files to compress, and try each and every combination? Because that's what I'm doing currently and this kinda sounds super inefficient so I suspect there's a way to find out what works with scanners or anything :D

Anyways, I'm eager to learning more about compression but I don't think I'm getting far without asking some dedicated beginner questions. I feel like I know some stuff but they are absolutely random bits of information in different fields and it's incredibly hard and really confusing trying to make sense of them :D

Thanks!
- Crimzan

KaktoR 25-11-2022 14:31

Quote:

Originally Posted by Crimzan (Post 499226)
I downloaded DiskSpan GUI, it seems like it's one of the more customizeable, yet very easy to use ones. Do you think this is a good tool to use or would I be better off using these exe's separately, or even a completely different software?

I would say this tool is handy, but have it's limitations aswell. Most repackers use their own tool set anyway, but in the end all of them are using the same compressors, with some additions and techniques.


Quote:

Originally Posted by Crimzan (Post 499226)
You said "srep+lolz" and "srep+lzma", does this mean, in DiskSpan GUI (if you are familiar with the software), I can select both srep first and then lolz / lzma and then it is basically what you had described?

To understand the logic behind this, when I select a folder to compress with DiskSpanGUI, "srep+lolz" would basically mean using srep first to deduplicate, and then compress the srep output with lolz?

Yes.


Quote:

Originally Posted by Crimzan (Post 499226)
I don't have Sniper Elite 4, but this is interesting -- how do you know srep+lolz is strong? Is it one of the strongest general combinations? Or how do you know, or in other words, how can I find out what compressors and thingies work the best?

lolz is mainly good for texture compression. You know, games use textures. Save your time and don't try to use lolz for audio/video files and such.

For instance, took some DDS image files, and compare ratios between srep+lolz and srep+lzma.

Spoiler: lolz will be superior on these files in terms of ratio. It's just a matter on how long you want to run the process and how small the output you want.


Quote:

Originally Posted by Crimzan (Post 499226)
Super interesting!
So, to make sure I understand what you said at the end, in DiskSpanGUI I would basically have xTool_zlib+srep+lolz (or lzma), is that correct?

Yes.


Quote:

Originally Posted by Crimzan (Post 499226)
Also how do you know it's compressed with zlib? Are you an experienced file magician and / or do you know of a scanner software that can test if a file is compressed, and what it is compressed with?

It's like common sense sometimes. If you are in the process for years, you will get a "sense" of it. For example take any Unreal Engine 4 game. Most of these games are compressed with zlib/reflate, many others with oodle, and a few even with lz4 or zstd.

To check a file, you can use xtool's verbose mode, or manually check the file with HxD or similar for magic numbers and such (this requires that you know about these things).

I'm not a magican or something, I still have questions sometimes too :)


Quote:

Originally Posted by Crimzan (Post 499226)
One final question, which is hopefully not too broad: What is your workflow finding 'the best' compression combinations (that is, not as slow as paq compression for instance but still really good compression ratio)? Is it Trial and Error? Like, do you just select a couple of files to compress, and try each and every combination? Because that's what I'm doing currently and this kinda sounds super inefficient so I suspect there's a way to find out what works with scanners or anything :D

On larger archives (like in UE4 games the *.pak files) use xtool's verbose mode to find out. After you find out, pick the file and compress it with different combinations until you are happy with the outcome (ratio/time). There is no "magic tool" to give you all answers about a file in general.

Personally I don't use lolz because it is time consuming af and it tooks literally all PC resources while running, and I want it to be as fast as possible with a decent outcome in ratio, therefore for me my choice is in most cases 4x4:lzma.

Masquerade 25-11-2022 22:49

Quote:

Originally Posted by Crimzan (Post 499226)
Also how do you know it's compressed with zlib? Are you an experienced file magician and / or do you know of a scanner software that can test if a file is compressed, and what it is compressed with?

Razor made drop + scan 4 zlib which is sometimes useful.

There's also this Zenhax page where Aluigi explains how to recognise different algorithms by their headers or magic numbers: https://zenhax.com/viewtopic.php?t=27

This requires a hex editor to view the data. I like HxD.

Crimzan 27-11-2022 05:28

I am happy you guys putting in the time to answer my questions, thanks a lot!

Quote:

Originally Posted by Masquerade (Post 499232)
There's also this Zenhax page where Aluigi explains how to recognise different algorithms by their headers or magic numbers: https://zenhax.com/viewtopic.php?t=27

I don't know much about Hexadicmal, I do have HxD and tried a 7z (LZMA2) and a standard windows zip file (I suspect LZMA because it says so in the link?); however, none of the Headers shown in the link are actually seen in the Hexadecimal view of these files for some reason. Why is that? Could it be that the header is just offset or are some diferences in the Bytes to be expected? I expected to find pretty much the exact same Header in my file as in the link. Do you know why it differs on my end? :o


Quote:

Originally Posted by KaktoR (Post 499229)
To check a file, you can use xtool's verbose mode

Would you mind explaining in a bit more detail how to use the XTool Verbose mode? I created a standard zip and also a 7zip file (LZMA2) and created a batch file based on what you showed in the link you provided (also changed the algorithm from mzlib to lzma2 (hoping that it works that way), but no matter what file I yeet onto xtool, all I get is this:

Code:

[0] Performing scan from block 0000000000000000 to 0000000000502C9D (5254302)

Streams: 0/0
Time: 00:00:00 (00:00:00)
Memory: 128 MB (128 MB)

I didn't expect it to not find any lzma2 streams in an lzma2 file, or other files I tried out with the adjusted algorithm parameter. I expected, similar to the "Drop and Scan 4 ZLib" Application from Razor to have different values here, that recognize how many parts of a file actually correspond to the compression algorithm. Am I misunderstanding the function and expecting a result that this tool is not supposed to give? If it isn't too much to ask, could you maybe show me a working result on a file?

Quote:

Originally Posted by KaktoR (Post 499229)
After you find out, pick the file and compress it with different combinations

So, let's keep things simple for now and let's say I found a file is actually compressed with LZMA2 / 7zip -- I would use xtool to decompress it (precomp?), receive a larger file, and then use a more efficient combination to get a better compression ratio, right?

Quote:

Originally Posted by KaktoR (Post 499229)
my choice is in most cases 4x4:lzma.

What does the 4x4: stand for? are these parameters in xtool or where does it come from? :confused:

Once again, I really appreciate you answering all these noob-ish questions, I really hope they aren't too bothersome! :D
Have a nice day guys!

- Crim

KaktoR 27-11-2022 06:00

Quote:

Originally Posted by Crimzan (Post 499238)
Would you mind explaining in a bit more detail how to use the XTool Verbose mode? I created a standard zip and also a 7zip file (LZMA2) and created a batch file based on what you showed in the link you provided (also changed the algorithm from mzlib to lzma2 (hoping that it works that way), but no matter what file I yeet onto xtool, all I get is this:

Code:

[0] Performing scan from block 0000000000000000 to 0000000000502C9D (5254302)

Streams: 0/0
Time: 00:00:00 (00:00:00)
Memory: 128 MB (128 MB)

I didn't expect it to not find any lzma2 streams in an lzma2 file, or other files I tried out with the adjusted algorithm parameter. I expected, similar to the "Drop and Scan 4 ZLib" Application from Razor to have different values here, that recognize how many parts of a file actually correspond to the compression algorithm. Am I misunderstanding the function and expecting a result that this tool is not supposed to give? If it isn't too much to ask, could you maybe show me a working result on a file?

You cannot use -mlzma2 directly. As far as I know, zip/7z files contain always reflate streams (correct me if I'm wrong).

So for zip/7z files you have to use -mreflate if they are compressed.

Example for what it should look like:
Code:

...
...
[0] Processed reflate stream at 00000000022750C2 (304787 >> 349571 >> 304787) using l9:w15 successfully
[0] Processed reflate stream at 00000000022BF7D2 (33359 >> 43715 >> 33359) using l9:w15 successfully
[0] Processed reflate stream at 00000000022C7B42 (9895 >> 20251 >> 9895) using l9:w15 successfully
[0] Processed reflate stream at 00000000022CA262 (219985 >> 349563 >> 219985) using l9:w15 successfully
[0] Processed reflate stream at 00000000022FFEC2 (155628 >> 278096 >> 155628) using l9:w15 successfully
[0] Processed reflate stream at 0000000002325F32 (141976 >> 174791 >> 141976) using l9:w15 successfully
[0] Processed reflate stream at 0000000002348A42 (1270475 >> 1398167 >> 1270475) using l9:w15 successfully
[0] Processed reflate stream at 000000000247ED92 (491179 >> 699087 >> 491179) using l9:w15 successfully
[0] Processed reflate stream at 00000000024F6CC2 (2433413 >> 2796295 >> 2433413) using l9:w15 successfully
[0] Processed reflate stream at 0000000002748EC2 (965084 >> 1398165 >> 965084) using l9:w15 successfully

Streams: 167/167
Time: 00:00:04 (00:00:03)
Memory: 175 MB (175 MB)

Here are some possible options:
Code:

zlib / reflate / preflate
kraken / mermaid / selkie / leviathan (part of oodle compression family, requires "oo2core_#_win64.dll" library near xtool.exe)
flac (wave audio)
packjpg / brunsli / jojpeg (for JPG images, requires corresponding libraries near xtool.exe)
png (PNG image precompression, requires -d1 option and preflate option -> -mpng:d1:preflate)
lz4 / lz4f / lz4hc (requires liblz4.dll library near xtool.exe)
zstd (requires libzstd.dll library near xtool.exe)



Quote:

Originally Posted by Crimzan (Post 499238)
So, let's keep things simple for now and let's say I found a file is actually compressed with LZMA2 / 7zip -- I would use xtool to decompress it (precomp?), receive a larger file, and then use a more efficient combination to get a better compression ratio, right?

Yes.



Quote:

Originally Posted by Crimzan (Post 499238)
What does the 4x4: stand for? are these parameters in xtool or where does it come from? :confused:

4x4 is part of freearc. It utilizes all cores (max 16) for compression. This gives a good speed boost, but cpu usage is 100% most of the time.

Masquerade 28-11-2022 04:07

Quote:

Originally Posted by KaktoR (Post 499239)
You cannot use -mlzma2 directly. As far as I know, zip/7z files contain always reflate streams (correct me if I'm wrong).

7z archives most commonly use LZMA2 since it's the default option when you select 7z container in 7Zip creation window.

Zip files most commonly use deflate for their compression, although you can use any algo with a zip container (zip header is PK). For example, Crysis 2 Remastered uses LZ4 on its zip game archives. We Are Football uses ZSTD on its zip archive.

Afair there's no current easy precompressor (e.g. xtool) for lzma[2]. I know pLZMA exists on encode forum but it's not a precompressor like XTool.


All times are GMT -7. The time now is 13:00.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com