FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   XTool - Successor of ZTool (https://fileforums.com/showthread.php?t=101729)

kassane 27-05-2018 08:02

I tested xtool in Divinity Original Sin 1 EE and 2.

GameMaster.pak[DOS2] => 426MB
Code:

methods:
1) xtool.exe e:precomp:c32mb:t100p:zlib
2) xtool.exe e:precomp:c32mb:t100p:lz4

Result:
Compressed 1 file, 447,157,530 => 447,157,650 bytes. Ratio 100.00%
Compression time: cpu 1.11 sec/real 9.31 sec = 12%. Speed 48.03 mB/s

PAK format

Razor12911 27-05-2018 21:45

Quote:

Originally Posted by kassane (Post 471212)
I tested xtool in Divinity Original Sin 1 EE and 2.

GameMaster.pak[DOS2] => 426MB
Code:

methods:
1) xtool.exe e:precomp:c32mb:t100p:zlib
2) xtool.exe e:precomp:c32mb:t100p:lz4

Result:
Compressed 1 file, 447,157,530 => 447,157,650 bytes. Ratio 100.00%
Compression time: cpu 1.11 sec/real 9.31 sec = 12%. Speed 48.03 mB/s

PAK format

Sample?

kassane 28-05-2018 08:07

Quote:

Originally Posted by Razor12911 (Post 471220)
Sample?

GameMaster.pak - (DOS2)

oltjon 28-05-2018 13:44

Call of Duty WWII
bulge.fd
bulge.ff
imagefile19.pak

link

MM32 28-05-2018 19:55

Please help with the decompression program

Razor12911 29-05-2018 15:08

Update available

Changes

- added ea frostbite 3 oodle and zstd support for fifa 18
- added dunia 2 lzo support for fc series
- added iw engine lz4hc support
- added partial crilayla support for naruto series
- added anvil engine lzo and oodle support
- fixed crilayla inflation bug
- fixed non-stdio mode bug
- updated zlib precompression
- removed MT scanning for some codecs

Razor12911 29-05-2018 16:21

Quote:

Originally Posted by doofoo24 (Post 471259)
test lzo on ac i afr detect more..

The samples you uploaded:

DataPC_LoadingRoom2.forge

afr19: 10,780,672 => 13,917,326 => 8,970,681 bytes
xtool: 10,780,672 => 13,917,332 => 8,983,511 bytes

DataPC_Map_Menu.forge

afr19: 1,605,632 => 6,956,755 => 821,299 bytes
xtool: 1,605,632 => 6,957,991 => 820,636 bytes

:confused::confused::confused:

Razor12911 29-05-2018 16:26

Quote:

Originally Posted by doofoo24 (Post 471261)
@Razor12911 i uploaded Samples of cod game's in DevXTool thread

have you tested xtool on the samples you uploaded?

Razor12911 29-05-2018 17:05

Quote:

Originally Posted by doofoo24 (Post 471265)
ok xtool setting
packcmd = xtool.exe e:precomp:c32mb,t6:lzo - - <stdin> <stdout>
work on all file but one by one if i apply xtool on all file seems to skip on ac i...

Have you tried to increase chunk size?

Quote:

Originally Posted by doofoo24 (Post 471266)
ok test it on cod aw 33gb to 37.2gb seems to work...

Skip verification to see what you're really suppose to get, if it's more then try using an older liblz4.dll since AW came before the version of the library in the attachment.

Razor12911 29-05-2018 17:20

Quote:

Originally Posted by doofoo24 (Post 471268)
increase chunk size ?
yes
tried to test it on ac ii nothing :confused:

Use the x86 version for that

Razor12911 29-05-2018 17:31

Yea, that game seems to contain lzopro compressed streams and I only added x86 support for now. Maybe it's AC4, not sure.
Edit:
AC2 was affected due to me not registering what codec to use for restoring, guess it really is a waste of energy.

Your file:
Compressed 1 file, 88,997,888 => 189,610,506 bytes. Ratio 213.05%
Compression time: cpu 0.09 sec/real 2.72 sec = 3%. Speed 32.66 mB/s

Razor12911 29-05-2018 17:47

Quote:

Originally Posted by doofoo24 (Post 471272)
sorry brother does not work :D
why bother afr work on all ac game's...
waste of your energy :p

really encouraging words

ZakirAhmad 29-05-2018 20:06

@Razor: Thanks mate for the update.
Keep up the good work.
Xtool is going to be more than a precompressor, so not adding any game support diverts it from that path.

Sergey3695 30-05-2018 04:34

Quote:

Originally Posted by Razor12911 (Post 471257)
- added partial crilayla support for naruto series

https://yadi.sk/d/WNKW73Ht3UpyVN
data.cpk (393 mb)
NARUTO SHIPPUDEN Ultimate Ninja STORM 2

[External compressor:xprecomp]
header = 0
packcmd = xtool.exe e:precomp:c32mb,t1:crilayla - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:c32mb,t1:crilayla - - <stdin> <stdout>

Extracting archive: data.arc
Extracting data.cpk (413123988 bytes)
ERROR: file _TEST\data.cpk failed CRC check
:confused:

kassane 30-05-2018 05:24

Hi Razor!

Did you test the sample I sent?

ZakirAhmad 30-05-2018 08:52

xtool v 0.7 Tried it on a file from AC orgins

it didnt expanded.
sorry to bother oodle was missing from arc.ini setting.
this sorted the issue.

afr expaned it to 163.15% while xtool to 162.91% xtool
restored it in only 14sec while afr took 18 seconds in my system

Now my only problem is with Dunia engine. i wrote dat file address in xtool.ini still no change.

BTW is farcry primal and James Camerons avatar supported.

KaktoR 30-05-2018 09:15

Yep, didn't expand with :lzo

Maybe wrong codec in arc.ini? lzo2.dll is in place

Edit: You have to use
Code:

:oodle
for Origins:rolleyes::D

Code:

DataPC.forge (ACO)

xtool v0.7 oodle: 273.088.512 Bytes => 574.853.120 Bytes
AFR:              273.088.512 Bytes => 574.849.024 Bytes

From this example xtool and AFR have pretty much the same compression speed (AFR is a little bit faster, but just a few secs)

elit 30-05-2018 13:52

Quote:

Originally Posted by Razor12911 (Post 470916)
Update available
In terms of the Dunia engine, I advise that you use the latest liblz4.dll to avoid some streams being skipped due to their major difference, this could be because even I myself am not sure if I used the correct parameters for recompression, if you have an idea of what is used, please comment. (I used lz4hc, level 9)

I dont know if you want to go this route, but the way I did my tests when developing lz4 packer for "Raiders of the Broken Planet" game was that I used both original and self-modified quickbms script for unpacking game archive first. I unpacked thus twice - for each.

In modified script only difference was that I disabled decompression by taking out "comtype" command and used "log" instead of "clog" to dump files raw & compressed.

So I had both compressed and decompressed individual files from archive. Then it was only matter of finding right/best cmp settings through hex editor and binary comparison(first on few files and then all) to get best setting. And even wrong(but close) settings were still compatible with 80%+ of all archive.

ShivShubh 30-05-2018 20:42

Quote:

Originally Posted by elit (Post 471297)
I dont know if you want to go this route, but the way I did my tests when developing lz4 packer for "Raiders of the Broken Planet" game was that I used both original and self-modified quickbms script for unpacking game archive first. I unpacked thus twice - for each.

In modified script only difference was that I disabled decompression by taking out "comtype" command and used "log" instead of "clog" to dump files raw & compressed.

So I had both compressed and decompressed individual files from archive. Then it was only matter of finding right/best cmp settings through hex editor and binary comparison(first on few files and then all) to get best setting. And even wrong(but close) settings were still compatible with 80%+ of all archive.

So by saying all that what were you trying to say by this "I dont know if you want to go this route" ? That Razor should find the correct parameters ? I don't think he has that much of an interest in far cry 5 or wants to waste time doing all that.

Razor12911 30-05-2018 21:28

Quote:

Originally Posted by Sergey3695 (Post 471284)
https://yadi.sk/d/WNKW73Ht3UpyVN
data.cpk (393 mb)
NARUTO SHIPPUDEN Ultimate Ninja STORM 2

[External compressor:xprecomp]
header = 0
packcmd = xtool.exe e:precomp:c32mb,t1:crilayla - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:c32mb,t1:crilayla - - <stdin> <stdout>

Extracting archive: data.arc
Extracting data.cpk (413123988 bytes)
ERROR: file _TEST\data.cpk failed CRC check
:confused:

i'll check :)

Edison007 31-05-2018 03:20

compr:
Code:

afr:v0+srep:m5f:l512:d512m:hash-+lolz:d64m - 37,6 MB (39 463 094 bytes)
xtool+srep:m5f:l512:d512m:hash-+lolz:d64m  - 37,8 MB (39 671 049 bytes)

dec time/speed:
Code:

cls-afr, v019 (x86)
t1 - 199.28 sec; ~  5.37 mB/s
t7 -  44.07 sec; ~ 24.29 mB/s
t8 -  42.89 sec; ~ 24.96 mB/s

xtool_x86, v07
t1 - 237.07 sec; ~  4.52 mB/s
t7 -  53.84 sec; ~ 19.88 mB/s
t8 -  51.19 sec; ~ 20.91 mB/s

xtool_x64, v07
t1 - 210.85 sec; ~  5.08 mB/s
t7 -  49.35 sec; ~ 21.69 mB/s
t8 -  46.91 sec; ~ 22.82 mB/s

Code:

1'070'530'560 ->  afr: 1'767'925'585 bytes
              -> xtool: 1'768,021'857 bytes

i7-4700MQ, 8gb ram, ram-disk, win7x64.


shazzla 31-05-2018 04:14

Similar happens on Agony's .PAK files(zlib,v0.7, v0.6 works good)
First file processed well,but the second one looks like simply copied.
Cant upload files because they are more than 10 gigs. :/

elit 31-05-2018 08:50

Quote:

Originally Posted by doofoo24 (Post 471309)
i think it may be better for Razor12911 if he develop the tool separately like pzlib/plz4/pzstd/plzo for games...
less of a headache ;)

How exactly is that less headache? This way at least he can re-use a lot of same code/routines for each compressor instead of duplicating and maintaining separate projects with a lot of same code.

Razor12911 31-05-2018 09:31

Update available

Changes

- fixed crilayla bug on naruto games
- fixed issue detecting lzo2a, lzo1c streams

@doofoo24
I have to agree with elit, It's more headache separating the codecs. An example would be ztool itself, normally when I make changes to pzlib, if it's not related to precompression itself, I had to make the same changes in plz4, plzo... sometimes I forget doing this and end up with different sources of each, in one, a bug was fixed then another bug appears in another, now there are bugs all over the codecs, different bugs, you end up trying to fix one and another pops up and so forth. The idea of putting everything together means one code, if one codec is affected, then all will be affected then I'll know the source of the bug.

Quote:

Originally Posted by Edison007 (Post 471306)
compr:
Code:

afr:v0+srep:m5f:l512:d512m:hash-+lolz:d64m - 37,6 MB (39 463 094 bytes)
xtool+srep:m5f:l512:d512m:hash-+lolz:d64m  - 37,8 MB (39 671 049 bytes)

dec time/speed:
Code:

cls-afr, v019 (x86)
t1 - 199.28 sec; ~  5.37 mB/s
t7 -  44.07 sec; ~ 24.29 mB/s
t8 -  42.89 sec; ~ 24.96 mB/s

xtool_x86, v07
t1 - 237.07 sec; ~  4.52 mB/s
t7 -  53.84 sec; ~ 19.88 mB/s
t8 -  51.19 sec; ~ 20.91 mB/s

xtool_x64, v07
t1 - 210.85 sec; ~  5.08 mB/s
t7 -  49.35 sec; ~ 21.69 mB/s
t8 -  46.91 sec; ~ 22.82 mB/s

Code:

1'070'530'560 ->  afr: 1'767'925'585 bytes
              -> xtool: 1'768,021'857 bytes

i7-4700MQ, 8gb ram, ram-disk, win7x64.


I wonder if there is still room for improvement.

Razor12911 31-05-2018 09:52

Quote:

Originally Posted by doofoo24 (Post 471315)
@Razor12911 xtool 0.7 seems to skip file's test it on ME A with zstd and before with lzo on ac 1...
xtool 0.6 work fine...
any idea ?
i will test with 0.8...

I didn't touch zstd codec in between the updates

ztool_08

Code:

Process ID      : 12240
Thread ID        : 19080
Process Exit Code: 0
Thread Exit Code : 0

User Time        :          24.500s
Kernel Time      :          0.734s
Process Time    :          25.234s
Clock Time      :          7.764s

Working Set      :          193016 KB
Paged Pool      :            114 KB
Nonpaged Pool    :              13 KB
Pagefile        :          314972 KB
Page Fault Count : 311084

IO Read          :          43332 KB (in            683 reads )
IO Write        :          101353 KB (in            1584 writes)
IO Other        :              3 KB (in            178 others)

ztool_06

Code:

Process ID      : 12748
Thread ID        : 14488
Process Exit Code: 0
Thread Exit Code : 0

User Time        :          24.890s
Kernel Time      :          1.125s
Process Time    :          26.015s
Clock Time      :          8.160s

Working Set      :          177480 KB
Paged Pool      :            115 KB
Nonpaged Pool    :              12 KB
Pagefile        :          229352 KB
Page Fault Count : 316978

IO Read          :          43262 KB (in            677 reads )
IO Write        :          101353 KB (in            1584 writes)
IO Other        :              5 KB (in            270 others)


Razor12911 31-05-2018 10:02

1 Attachment(s)
Quote:

Originally Posted by Edison007 (Post 471306)
compr:
Code:

afr:v0+srep:m5f:l512:d512m:hash-+lolz:d64m - 37,6 MB (39 463 094 bytes)
xtool+srep:m5f:l512:d512m:hash-+lolz:d64m  - 37,8 MB (39 671 049 bytes)

dec time/speed:
Code:

cls-afr, v019 (x86)
t1 - 199.28 sec; ~  5.37 mB/s
t7 -  44.07 sec; ~ 24.29 mB/s
t8 -  42.89 sec; ~ 24.96 mB/s

xtool_x86, v07
t1 - 237.07 sec; ~  4.52 mB/s
t7 -  53.84 sec; ~ 19.88 mB/s
t8 -  51.19 sec; ~ 20.91 mB/s

xtool_x64, v07
t1 - 210.85 sec; ~  5.08 mB/s
t7 -  49.35 sec; ~ 21.69 mB/s
t8 -  46.91 sec; ~ 22.82 mB/s

Code:

1'070'530'560 ->  afr: 1'767'925'585 bytes
              -> xtool: 1'768,021'857 bytes

i7-4700MQ, 8gb ram, ram-disk, win7x64.


Ran a test using the samples I got from forum. Very small input but got these results:

Input: 278 MB (291,605,504 bytes)
DataPC_Map_Menu.forge (ACI)
DataPC_LoadingRoom2.forge (ACI)
DataPC.forge (ACII)
DataPC.forge (ACIV)

Quote:

command line:
xtool_x86: d:precomp:t# %1.out1 %1.res
afr19_x86: d -v0 -t# %1.out2 %1.res

Thread(1) = 1 result:
xtool: 17.898s, 18.050s, 17.901s, 18.056s, 17.942s
afr19: 17.853s, 17.875s, 18.173s, 17.865s, 17.879s

Thread(s) = 2 result:
xtool: 9.120s, 9.156s, 9.035s, 9.067s, 9.008s
afr19: 9.394s, 9.356s, 9.318s, 9.248s, 9.291s

Thread(s) = 3 result:
xtool: 6.325s, 6.412s, 6.249s, 6.412s, 6.264s
afr19: 6.603s, 6.511s, 6.696s, 6.517s, 6.691s
Not sure in terms of results here, I ran test on ramdisk using my old core 2 extreme, I didn't include t4 since those are mostly irrelevant.

As for final output after compression, I'd be taking a gamble when I say it's headers since they include stuff like what codec was used since xtool is not just made for one game engine but I'll check in terms of the number of streams found by xtool vs afr

Razor12911 31-05-2018 10:08

Quote:

Originally Posted by doofoo24 (Post 471319)
tried xtool 0.8 and 0.7 on multiple files at once like shazzla First file processed well,but the second one looks like simply copied.
lz4 / lzo /zlib

upload files and command line used

pakrat2k2 31-05-2018 10:09

ALWAYS choose disable smilies, when posting/ replying ( checkbox below message box )

pain to have to come in & clean up posts & quotes.

Edison007 31-05-2018 10:40

Quote:

Not sure in terms of results here
It's normal, because i using differents decode methods in cls and exe. In cls i use some tricks, which allow me to get a higher speed. exe-decoder, yes, slower.

Quote:

I'll check in terms of the number of streams found by xtool vs afr
I think, that numbers of streams found is the same. But maybe in AFR the output container is more successfully made ;)

Quote:

I wonder if there is still room for improvement.
Yep, but I'm not interested in this engine anymore.

KaktoR 31-05-2018 10:56

Quote:

Originally Posted by Edison007 (Post 471325)
Yep, but I'm not interested in this engine anymore.

So, what's your next clue? :D

Simorq 31-05-2018 11:14

NSUNS3 XTool 0.8
 
Code:

dataRegion.cpk 607 MB> 1.59 GB
Code:

FreeArc 0.67 (March 15 2014) creating archive: data.arc
Compressed 2 files, 636,697,912 => 1,711,252,663 bytes. Ratio 268.77%
Compression time: cpu 0.89 sec/real 141.42 sec = 1%. Speed 4.50 mB/s
All OK

Code:

FreeArc 0.67 (March 15 2014) testing archive: data.arc
Tested 2 files, 1,711,252,663 => 636,697,912 bytes. Ratio 268.77%
Testing time: cpu 0.80 sec/real 118.83 sec = 1%. Speed 5.36 mB/s
All OK


Razor12911 31-05-2018 11:52

Quote:

Originally Posted by doofoo24 (Post 471331)
test xtool precomp:zlib with 0.6 vs 0.8 on just cause 2

and... which is which?

Sergey3695 31-05-2018 13:59

NARUTO SHIPPUDEN Ultimate Ninja STORM 2
FreeArc 0.67 unpacker. Extracting archive: data.arc
Extracting dataRegion.cpk (716396224 bytes)
All OK
129.547s: unarc x -o+ -w.\ -dp_TEST data.arc

Razor12911 31-05-2018 14:12

Update available

Changes

- fixed 2gb+ input issue... (int32 instead of int64 :()

Code:

xtl06:
Compressed 46 files, 13,586,655,989 => 22,419,187,764 bytes. Ratio 165.01%

xtl07-08:
Compressed 46 files, 13,586,655,989 => 15,710,322,921 bytes. Ratio 115.63%

xtl09:
Compressed 46 files, 13,586,655,989 => 22,419,187,764 bytes. Ratio 165.01%


oltjon 31-05-2018 14:34

1 Attachment(s)
:confused:

KaktoR 31-05-2018 14:41

crilayla only works with 32 bit

oltjon 31-05-2018 14:49

1 Attachment(s)
:confused: xtool 32bit

KaktoR 31-05-2018 15:04

zstd and oodle are 64bit only. There is no 32bit for these

Razor12911 31-05-2018 15:19

Quote:

Originally Posted by KaktoR (Post 471345)
zstd and oodle are 64bit only. There is no 32bit for these

actually zstd 32-bit is there, just that perhaps the library I included requires a prerequisite.

libgcc_s_dw2-1.dll

as for oodle, I didn't bother with 32-bit version considering the fact that it's memory hungry plus most games ship with the win64 version.

doofoo24 31-05-2018 15:33

xtool 0.9 precomp:t100p:lz4 :
COD WWII 38.4GB TO 62.3GB to 25.8gb srep+lolz
COD AW 33GB TO 63.8GB to 20.3gb srep+lolz


All times are GMT -7. The time now is 18:48.

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