FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   [Dev]XTool (https://fileforums.com/showthread.php?t=101613)

KaktoR 26-05-2018 15:18

Which Anvil engine?
Scimitar?
Anvil?
AnvilNext?
AnvilNext 2?

Razor12911 26-05-2018 15:20

Pretty much all of them.

KaktoR 26-05-2018 15:27

Quote:

Originally Posted by Razor12911 (Post 471187)
Pretty much all of them.

Here are samples from Origins, which is AnvilNext2. The only Anvil files i have atm on hard drive. Have fun

https://www96.zippyshare.com/v/klkEQZ94/file.html

Razor12911 26-05-2018 16:51

Quote:

Originally Posted by doofoo24 (Post 471193)

Isn't there a file with the same name but with ".fat" extension that goes with this?

Razor12911 26-05-2018 17:18

Quote:

Originally Posted by doofoo24 (Post 471199)
all the file's that uploaded work with afr and afr:a2 for unity and syndicate

Great stuff, time to get to work :)

doofoo24 29-05-2018 17:39

i deleted the link's to aviod problem...
i assume you downloaded the samples

kassane 02-06-2018 08:45

Divinity Original Sin 2 - Samples:
GDrive folder

Razor12911 03-06-2018 01:03

Quote:

Originally Posted by kassane (Post 471407)
Divinity Original Sin 2 - Samples:
GDrive folder

I did run a test, but forgot to report results but it seems to work with xtool with it being set to zlib.

FG repack has this to report:
Code:

Repack uses ZTool library by Razor12911

Razor12911 16-06-2018 18:09

1 Attachment(s)
Here's a test for a possible addition to xtool operation option

Try testing the xpreproc method on the entire game, edit the batch file to specify game location.

The game must have zlib streams, best examples would be Forza Horizon 3, GTA and so forth.

Report something like this
Code:

Compressed 1 file, 429,620,439 => 294,418,241 bytes. Ratio 68.53%
Compression time: cpu 0.47 sec/real 10.40 sec = 5%. Speed 41.32 mB/s

Only do this test below after the first one if possible, it's just up to you.

You can apply xprecomp if you want to perform further tests then srep afterwards
basically something like this:

xprecomp+srep
vs
xpreproc+xprecomp+srep

I'm interested srep's decompression memory so post the usage of memory for when xpreproc was applied and when it wasn't

Simorq 16-06-2018 18:49

Code:

LINKDATA_ENG_LANG.BIN 83 MB
Code:

-mxpreproc
Compressed 1 file, 87,191,552 => 77,684,585 bytes. Ratio 89.10%
Compression time: cpu 0.14 sec/real 1.35 sec = 10%. Speed 64.47 mB/s
All OK

-mxprecomp
Compressed 1 file, 87,191,552 => 454,736,069 bytes. Ratio 521.54%
Compression time: cpu 0.14 sec/real 10.47 sec = 1%. Speed 8.33 mB/s
All OK

-mxpreproc+xprecomp
Compressed 1 file, 87,191,552 => 236,598,374 bytes. Ratio 271.35%
Compression time: cpu 0.09 sec/real 9.82 sec = 1%. Speed 8.88 mB/s
All OK


Simorq 16-06-2018 18:52

Code:

Mafia3 > fmv_dlc1_0090_goobye_roxy.sds 25.1 MB
Code:

-mxpreproc
Compressed 1 file, 26,332,840 => 26,332,840 bytes. Ratio 100.00%
Compression time: cpu 0.02 sec/real 0.46 sec = 3%. Speed 56.86 mB/s
All OK

-mxprecomp
Compressed 1 file, 26,332,840 => 52,460,472 bytes. Ratio 199.22%
Compression time: cpu 0.02 sec/real 2.10 sec = 1%. Speed 12.51 mB/s
All OK

-mxpreproc+xprecomp
Compressed 1 file, 26,332,840 => 52,460,472 bytes. Ratio 199.22%
Compression time: cpu 0.05 sec/real 2.53 sec = 2%. Speed 10.42 mB/s
All OK


Simorq 16-06-2018 19:06

Code:

770000620.zip 76.7 MB
Code:

-mxpreproc
Compressed 1 file, 80,478,498 => 79,861,084 bytes. Ratio 99.23%
Compression time: cpu 0.11 sec/real 1.72 sec = 6%. Speed 46.77 mB/s
All OK

-mxprecomp
Compressed 1 file, 80,478,498 => 80,478,546 bytes. Ratio 100.00%
Compression time: cpu 0.13 sec/real 24.25 sec = 1%. Speed 3.32 mB/s
All OK

-mxpreproc+xprecomp
Compressed 1 file, 80,478,498 => 79,861,132 bytes. Ratio 99.23%
Compression time: cpu 0.08 sec/real 23.58 sec = 0%. Speed 3.41 mB/s
All OK

:confused:

Razor12911 17-06-2018 17:02

The idea here guys is for xpreproc to give xprecomp a smaller input which speeds up the process while giving roughly the same output as when it wasn't used.

-mxprecomp:
Code:

Compressed 225 files, 3,253,110,016 => 5,314,555,404 bytes. Ratio 163.37%
Compression time: cpu 5.31 sec/real 250.34 sec = 2%. Speed 12.99 mB/s

-xpreproc+xprecomp:
Code:

Compressed 225 files, 3,253,110,016 => 1,441,325,440 bytes. Ratio 44.31%
Compression time: cpu 5.92 sec/real 132.72 sec = 4%. Speed 24.51 mB/s

if you compress 4.94 GB (5,314,557,896 bytes) output, also the 1.34 GB (1,441,327,942 bytes) output, you should get the same output, the plan here is to reduce srep's memory usage and give a bit of speed and lessen IO whenever srep has created its VM file.

Mini 21-06-2018 11:15

The Crew 2 - Open Beta
xtool not working :(

files https://www64.zippyshare.com/v/dbhy7vY9/file.html

Razor12911 21-06-2018 20:38

1 Attachment(s)
Quote:

Originally Posted by Mini (Post 471860)
The Crew 2 - Open Beta
xtool not working :(

files https://www64.zippyshare.com/v/dbhy7vY9/file.html

The header file (fat) is different from the predecessors however, since this isn't lzo nor lz4, I can detect the streams directly from the dat files meaning no need to add files in xtool.ini

Try testing this program I made, it only detects streams currently, I tried to make a quick update for xtool to add support for this but I'm under a lot of work right now.

Perhaps to help, you could try figuring out what method of oodle was used from the extracted streams because I really don't have time currently.

scenaric.dat
Code:

Position: 00000000, Size: 2549827 >> 4194304
Position: 0026E843, Size: 124764 >> 624087
Position: 0028CF9F, Size: 222826 >> 1241117
Position: 002C365F, Size: 2022 >> 7909
...
Position: 00481892, Size: 4014 >> 121496
Position: 00482840, Size: 335 >> 1006
Position: 00482AF2, Size: 313 >> 1006

Overall size: 4724247 >> 15863935

I only tested this file

Mini 22-06-2018 01:47

usa_world.dat
Overall size: 304237021 >> 824626021

works! :)

Razor12911 22-06-2018 13:32

I figured out what they used with the spare break I had, they used the Hydra codec if I'm not mistaken. I didn't add Hydra support in xtool but I will in future.

Razor12911 23-06-2018 21:26

1 Attachment(s)
Quote:

Originally Posted by Mini (Post 471872)
usa_world.dat
Overall size: 304237021 >> 824626021

works! :)

Could you rerun test, I want to see if correct and improved information is found. I played around with the scanner a bit.

@everyone
Participate if possible, try testing this with several games that use oodle, leave out Project CARS 2 out for now since that game is encrypted.

Mini 23-06-2018 22:56

usa_world.dat
Overall size: 314783065 >> 844382444

Edison007 28-06-2018 03:35

1 Attachment(s)
Quote:

Originally Posted by Mini (Post 471860)
The Crew 2 - Open Beta
xtool not working :(

files https://www64.zippyshare.com/v/dbhy7vY9/file.html

I had time, and i added support for this files.
Also I added parsing FAT from watch_dogs, but without (de)compression yet.
It takes time to deal with the xcompress-library.

ZakirAhmad 11-07-2018 19:03

@Razor: is xtool going to b updated.

Razor12911 20-05-2020 13:46

2 Attachment(s)
Hi guys, long time :)

I haven't coded in a while so you can imagine:
Attachment 26918

I came up with an idea before I went hiatus which was deduplication of streams in xtool. Basically xtool permutes or disregards then removes repeated streams to improve performance. It's the same stuff that srep does only, xtool does it before srep so it improves IO and lessens memory usage.

What I want you guys to do is check out if this thing improves ratio if any and if decompression memory of srep goes down significantly, example. For examples like GTAV and lastly if there are no issues, I did rework the source a bit to make it stable.

My test input is No Man's Sky with the Beyond update (seems like devs have done a good job making sure they don't repeat game resources, wasn't the results I was not expecting...)

Code:

xtool 2019:
Compressed 104 files, 9,610,947,737 => 22,079,473,953 bytes. Ratio 229.73%
Compression time: cpu 12.20 sec/real 559.10 sec = 2%. Speed 17.19 mB/s

srep393b:
100%: 22,079,475,924 -> 14,306,151,312: 64.79%.  Cpu 123 mb/s (171.078 sec), real 126 mb/s (167.671 sec) = 102%.  Remains 00:00
Decompression memory is 699 mb.  6,413,440 matches = 102,615,040 bytes = 0.72% of file

lzturbo:
Compressed 1 file, 14,306,163,456 => 7,573,816,911 bytes. Ratio 52.94%
Compression time: cpu 16.19 sec/real 255.92 sec = 6%. Speed 55.90 mB/s

Code:

xtool 2020:
Compressed 104 files, 9,610,947,737 => 18,987,442,809 bytes. Ratio 197.56%
Compression time: cpu 10.94 sec/real 483.97 sec = 2%. Speed 19.86 mB/s

srep393b:
100%: 18,987,444,781 -> 14,276,551,933: 75.19%.  Cpu 113 mb/s (160.000 sec), real 114 mb/s (158.234 sec) = 101%.  Remains 00:00
Decompression memory is 436 mb.  4,696,348 matches = 75,141,568 bytes = 0.53% of file

lzturbo:
Compressed 1 file, 14,276,560,829 => 7,565,632,525 bytes. Ratio 52.99%
Compression time: cpu 16.86 sec/real 250.04 sec = 7%. Speed 57.10 mB/s

What do these results mean? and why is xtool 2020 producing less output compared to 2019 but somehow after using srep, the output is better?

Well as usual, I always have ideas to try to improve the xtool project for even more speed. I reviewed the project from all possible angles and found that optimisations of the program are nearing its limits meaning I cannot make the program any faster.

However then came an idea to steal some of the work srep does and make xtool involved, this resulted in the idea of making xtool detect and permute repeated streams, as a result. 2020 xtool most of the time will produce less output but when you compare it to 2019's version after using srep, the output is roughly the same or better.

You might ask, what is the point of taking some of srep's work and making it for xtool. Well this is because games over the years get endless updates, example is No Man's Sky and GTAV so there is a high chance that there are several repeated streams and as a result, if xtool doesn't take the job, it will be a job for xtool to deal with when installing a game because srep will require more decompression memory and xtool will process more streams resulting in extended installation times.

Note: I was expecting srep to produce the same result from both 2019 and 2020, because the main idea here is to improve installation times.

TL;DR

Xtool 2020 will produce less output compared to xtool 2019 because it takes some of the work of srep to reduce memory usage when installing a game while also improving speed significantly due to less streams being processed and less IO. (Theoretically at least)

Overall test results (compression):
8.95 GB (original) > 20.5 GB (xtool 2019 / 9 mins 19 secs) > 13.3 GB (srep m3f / 699mb dec memory) > 7.05 GB (lzturbo 32 b128)
8.95 GB (original) > 17.6 GB (xtool 2020 / 8 mins 4 secs) > 13.2 GB (srep m3f / 436mb dec memory) > 7.04 GB (lzturbo 32 b128)

I used "lzturbo 32" to speed up the final compression results (I'm a bit busy), but you will get the idea when you run tests yourselves.

Decompression mode is unavailable, I still have to write the code for it.

If you don't have GTAV or any other game which has live updates or a game with a lot of repetitions, you can just make a copy of the same input then give it to xtool to see what happens.

These optimisations are making me feel like Intel right now... 14nm+++++++++++++++++++++++ :o

Cesar82 20-05-2020 16:25

@Razor12911
Thanks for the great job.
After completing this if you have time (also if possible), do a functional calback for your cls-diskspan library.
There are also some bugs with this library, using compressions formed by 3 methods.
Thank you!

doofoo24 20-05-2020 17:48

so i guess only game with zlib for now maybe game like mad max will see improvement last time i compressed the game it was with xtool+srep:m2f+lolz memory usage was way less than srep:m3f but the final game size was 300-400mb more but game install was much more faster...
if i remember correctly m3f dec mem was around 17gb but with m2f around 3-4gb...

devil777 20-05-2020 22:40

To be... honest... desiring a Xtool version... which will work like Pzlib v3 4ever


Thanks razor for all the works

Razor12911 21-05-2020 22:53

Quote:

Originally Posted by Cesar82 (Post 485939)
@Razor12911
Thanks for the great job.
After completing this if you have time (also if possible), do a functional calback for your cls-diskspan library.
There are also some bugs with this library, using compressions formed by 3 methods.
Thank you!

Noted

Razor12911 23-05-2020 05:17

Ok I decided to get Need For Speed The Run because I remembered that the game required a lot of decompression memory for srep to best demonstrate what I want to do with this deduplication idea.

I was surprised by the results

Xtool 2019:
Code:

Compressed 120 files, 14,503,034,446 => 29,120,915,487 bytes. Ratio 200.79%
Compression time: cpu 17.25 sec/real 807.42 sec = 2%. Speed 17.96 mB/s

100%: 29,120,917,667 -> 8,068,516,819: 27.71%.  Cpu 223 mb/s (124.672 sec), real 225 mb/s (123.527 sec) = 101%.  Remains 00:00
Decompression memory is 5660 mb.  2,922,729 matches = 46,763,664 bytes = 0.58% of file

Compressed 1 file, 8,068,559,139 => 4,315,048,356 bytes. Ratio 53.48%
Compression time: cpu 10.02 sec/real 172.58 sec = 6%. Speed 46.75 mB/s

Xtool 2020:
Code:

Compressed 120 files, 14,503,034,446 => 12,121,343,984 bytes. Ratio 83.58%
Compression time: cpu 16.13 sec/real 368.86 sec = 4%. Speed 39.32 mB/s

100%: 12,121,346,164 -> 8,010,462,480: 66.09%.  Cpu 141 mb/s (81.719 sec), real 145 mb/s (79.890 sec) = 102%.  Remains 00:00
Decompression memory is 759 mb.  2,105,722 matches = 33,691,552 bytes = 0.42% of file

Compressed 1 file, 8,010,469,968 => 4,296,282,176 bytes. Ratio 53.63%
Compression time: cpu 9.88 sec/real 159.45 sec = 6%. Speed 50.24 mB/s


Overall test results (compression):
13.5 GB (original) > 27.1 GB (xtool 2019 / 13 mins 27 secs) > 7.51 GB (srep m3f / 5660mb dec memory) > 4.02 GB (lzturbo 32 b128)
13.5 GB (original) > 11.2 GB (xtool 2020 / 6 mins 9 secs) > 7.45 GB (srep m3f / 759mb dec memory) > 4.00 GB (lzturbo 32 b128)

Not only is xtool 2020 faster but it produced a slightly better result while reducing srep's decompression memory. That 13.5 GB > 11.2 GB is not a mistake, xtool did precompress the data but there were too many repeated streams in the input and it removed a lot of them which resulted in negative ratio.

Notes: Xtool does incur additional decoding memory but it will definitely not be 5.6GB, it will far less. Maybe 2GB but if I apply proper memory management, I can reduce it to 1GB saving an additional 3GB of ram for lolz or something else.

78372 23-05-2020 07:13

1 Attachment(s)
Code:

FreeArc 0.67 (March 15 2014) creating archive: data19.arc
Compressed 1 file, 197,759,488 => 941,714,574 bytes. Ratio 476.19%
Decompression memory is 116 mb.  146,130 matches = 2,338,080 bytes = 0.71% of file

Code:

FreeArc 0.67 (March 15 2014) creating archive: data20.arc
Compressed 1 file, 197,759,488 => 734,656,804 bytes. Ratio 371.49%
Decompression memory is 43 mb.  136,880 matches = 2,190,080 bytes = 0.66% of file

Good work ;)

Cesar82 23-05-2020 16:36

@Razor12911
Good work! Great results!

I don't understand practically anything about compression and flow methods, etc., but CIU has XTool (old Xtool, not 2019) and ZTool, and as far as I know some of the flows (I think that's it) are not supported by Xtool.
I would like to know if in this version when it is finished it will support all flows that old ZTool and Xtool support, or it will always be necessary to keep XTool + ZTool in CIU if I use XTool 2020.
It would be great to be able to remove some of the compressors from CIU.
Thank you!

FitGirl 23-05-2020 19:54

Thanks for returning to the project, deduplication is a very useful feature.
I have an idea which will reduce the required RAM for dedup. You may store some rare/large duplicated streams in a temp file, while storing small/frequent dupes in RAM - this way the excessive HDD load won't happen, cause reads will be rare and the RAM won't be used that much. 1-2 GB is a pretty big amount even for machines with 8 GB. And for users with 4 GB installation will be almost impossible, considering srep and lolz/lzma. Even with page file. So reduction/control over used RAM is a must, I think.

I'd recommend you Halo Reach for testing dedup, it has tons of duplicate streams of a different size.

Gupta 23-05-2020 22:40

Quote:

You may store some rare/large duplicated streams in a temp file, while storing small/frequent dupes in RAM - this way the excessive HDD load won't happen,
maybe he can introduce the second phase in compression, then he can store forward reference count for a stream that should ideally decrease requirements memory size beyond window size and that should increase compression too.

HDDs are very slow, I recently upgraded to nvme based storage and I can feel the speed.

panker1992 28-05-2020 11:48

Dedup
 
Quote:

Originally Posted by FitGirl (Post 485989)
Thanks for returning to the project, deduplication is a very useful feature.
I have an idea which will reduce the required RAM for dedup. You may store some rare/large duplicated streams in a temp file, while storing small/frequent dupes in RAM - this way the excessive HDD load won't happen, cause reads will be rare and the RAM won't be used that much. 1-2 GB is a pretty big amount even for machines with 8 GB. And for users with 4 GB installation will be almost impossible, considering srep and lolz/lzma. Even with page file. So reduction/control over used RAM is a must, I think.

I'd recommend you Halo Reach for testing dedup, it has tons of duplicate streams of a different size.

there is also a sorting match feature that can reduce ram needed and that is as follows.

srep does a very good job finding matches that are located far away!
that in order to happen makes a dictionary!
IF you sort the files you feed srep you can actually reduce ram needed and its speed

Sorting preprocession can speedup the process and cost less ram !! and remove IO overhead because NO temps

Razor12911 29-05-2020 01:23

Quote:

Originally Posted by FitGirl (Post 485989)
Thanks for returning to the project, deduplication is a very useful feature.
I have an idea which will reduce the required RAM for dedup. You may store some rare/large duplicated streams in a temp file, while storing small/frequent dupes in RAM - this way the excessive HDD load won't happen, cause reads will be rare and the RAM won't be used that much. 1-2 GB is a pretty big amount even for machines with 8 GB. And for users with 4 GB installation will be almost impossible, considering srep and lolz/lzma. Even with page file. So reduction/control over used RAM is a must, I think.

I'd recommend you Halo Reach for testing dedup, it has tons of duplicate streams of a different size.

Quote:

Originally Posted by Gupta (Post 485991)
maybe he can introduce the second phase in compression, then he can store forward reference count for a stream that should ideally decrease requirements memory size beyond window size and that should increase compression too.


HDDs are very slow, I recently upgraded to nvme based storage and I can feel the speed.

Quote:

Originally Posted by panker1992 (Post 486059)
there is also a sorting match feature that can reduce ram needed and that is as follows.

srep does a very good job finding matches that are located far away!
that in order to happen makes a dictionary!
IF you sort the files you feed srep you can actually reduce ram needed and its speed

Sorting preprocession can speedup the process and cost less ram !! and remove IO overhead because NO temps


Believe me I have several ideas of how to reduce memory usage before even relying on virtual memory. Optimisation is my middle name.

bunti_o4u 29-05-2020 09:13

Quote:

Originally Posted by Edison007 (Post 472130)
I had time, and i added support for this files.
Also I added parsing FAT from watch_dogs, but without (de)compression yet.
It takes time to deal with the xcompress-library.

does it support stdio?

if you add stdio, it would be great..

panker1992 29-05-2020 12:30

xcompress if pure windows 10 compression, and i think it supports it by default.

Razor12911 10-07-2020 16:06

1 Attachment(s)
Can you guys test this. I added preflate as an alternative of reflate in case if you are having issues with crc errors when you use reflate or prolonged precompression times such as this:
Quote:

Originally Posted by dixen (Post 486161)
Dishonored: Death of the Outsider

*.resources - 17 gb > 25.1 gb for 23 minutes on 4 threads

For example. ZTool or Xtool (v0.12) - 30% for 4 hours

Thanks BLACKFIRE69

test unpack

I'm no expert when it comes to C++ and I did my best to compile a library for xtool to use so it may have bugs.

I ran a benchmark and here are the results

benchmark results on "game1.resources" from "Dishonored Death of the Outsiders"
xtool_2019:
Code:

8.30 GB >> ?? >> ?? >> ??
precompression time using 4 threads = it's better to watch paint dry (takes hours)

xtool_2020 (WIP):
Code:

8.30 GB >> 11.3 GB >> 8.74 GB >> 6.24 GB
precompression time using 2 threads = 8 minutes, 48 seconds
precompression time using 4 threads = 5 minutes, 7 seconds

PrecompX:
Code:

8.30 GB >> 11.1 GB >> 8.79 GB >> 6.28 GB
precompression time using 4 threads = 8 minutes, 29 seconds


dixen 12-07-2020 13:13

Dishonored Death of the Outsiders

game1.resources

Quote:

Compressed 1 file, 8,920,763,754 => 11,774,785,195 bytes. Ratio 131.99%
Compression time: cpu 11.31 sec/real 385.94 sec = 3%. Speed 23.11 mB/s
All OK
When unpack function?)

Razor12911 13-07-2020 21:01

1 Attachment(s)
Quote:

Originally Posted by dixen (Post 486764)
Dishonored Death of the Outsiders

game1.resources



When unpack function?)

Soon, maybe this week. Still busy writing the main code while looking for more ways to speed up processing :)

lolaya 14-07-2020 06:34

what is ztool and xtool and lolz?

Grumpy 14-07-2020 08:42

Quote:

Originally Posted by lolaya (Post 486806)
what is ztool and xtool and lolz?

That information is already available on these forums, search and you will find, you can not expect for others to always hold your hand and spoon feed you all the time. ;)


All times are GMT -7. The time now is 17:27.

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