FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   XTool 2020 (Main Project) (https://fileforums.com/showthread.php?t=102832)

L33THAK0R 13-07-2022 07:01

Are there any current situations/titles that could benefit from the fast lzma2 compression option? Not fully awake, apologies if this is a tad silly to ask, with the answer being plainly obvious.

:( Sad8669 13-07-2022 08:06

As far as i know, it was added to increase the portability of xtool.

Code:

Notes:
I have added fast lzma2 compression for users who would want to use xtool without FA but still want to perform compression immediately after precompressing.


Cesar82 13-07-2022 11:29

Quote:

Originally Posted by Razor12911 (Post 497597)
Code:

xtool.exe precomp -mzlib -c32mb -t100p --dbase --dedup --compress=l10,t100p - -

XTool is going independent, abandoning its helpers, lol.
Maybe in the future it will get its own final compression with high compression gain and higher performance than lolz... It would be great!

Masquerade 13-07-2022 12:14

Quote:

Originally Posted by L33THAK0R (Post 497604)
Are there any current situations/titles that could benefit from the fast lzma2 compression option? Not fully awake, apologies if this is a tad silly to ask, with the answer being plainly obvious.

No, it's just a final compresison option. A bit like how precomp has built in LZMA compressor :)

@Razor thanks for the continued updates!

CR2032 14-07-2022 14:45

Quote:

Originally Posted by L33THAK0R (Post 497604)
Are there any current situations/titles that could benefit from the fast lzma2 compression option? Not fully awake, apologies if this is a tad silly to ask, with the answer being plainly obvious.

Hello.
No. It's just a creative and really a gifted step, not more.:)

CR2032 14-07-2022 14:55

Quote:

Originally Posted by Masquerade (Post 497613)
No, it's just a final compresison option. A bit like how precomp has built in LZMA compressor :)

@Razor thanks for the continued updates!

Hello.
Exactly like that! Like a Precomp compression with the key -c.:)

Razor12911 15-07-2022 10:50

Update available

Changes

- added feature to inject libraries to main executable

Notes

You may notice that the libraries folder is getting filled with a lot of dll files which xtool uses so reduce this cumbersomeness you might want to embed all of these dlls within the main executable and placing the dlls near xtool.exe is no longer needed as they will become part of the executable.

This feature is added to promote portable mode where all you have is the files you want to process and xtool.exe with no libraries nearby.

Usage
Code:

xtool.exe inject dll_file
More notes

Only inject lz4, zstd and oodle when you are sure that your input will never need library swaps as these libraries depending on version determine precompression ratio. zlib, reflate and some other libraries do not as every version produces the same results.

Cesar82 15-07-2022 11:57

@Razor12911, thank you very much for the constant updates.

1) Is it possible to update the previously injected libraries?
2) XTool 0.3.21 has been removed from the main post... Will we have updates for the remaining plugins soon?
3) Is it necessary to include the "fast-lzma2.dll" library to use xtool's lzma2 internal method?
4) What xtool method is the library "xdelta3_dll.dll" from the _libraries folder used for?

CR2032 15-07-2022 15:55

Quote:

Originally Posted by Razor12911 (Post 497634)
Update available

Changes

- added feature to inject libraries to main executable

Notes

You may notice that the libraries folder is getting filled with a lot of dll files which xtool uses so reduce this cumbersomeness you might want to embed all of these dlls within the main executable and placing the dlls near xtool.exe is no longer needed as they will become part of the executable.

This feature is added to promote portable mode where all you have is the files you want to process and xtool.exe with no libraries nearby.

Usage
Code:

xtool.exe inject dll_file
More notes

Only inject lz4, zstd and oodle when you are sure that your input will never need library swaps as these libraries depending on version determine precompression ratio. zlib, reflate and some other libraries do not as every version produces the same results.

Thank You So Much, Razor12911!
I think this is the really great solution.:)

CR2032 15-07-2022 16:19

Quote:

Originally Posted by Cesar82 (Post 497636)
@Razor12911, thank you very much for the constant updates.

1) Is it possible to update the previously injected libraries?
2) XTool 0.3.21 has been removed from the main post... Will we have updates for the remaining plugins soon?
3) Is it necessary to include the "fast-lzma2.dll" library to use xtool's lzma2 internal method?
4) What xtool method is the library "xdelta3_dll.dll" from the _libraries folder used for?

Hello.
1. Perhaps, just replace old to new.
For example:
If I have xtool.exe with integrated libraries:
xtool.exe inject _libraries\fast-lzma2.dll
xtool.exe inject _libraries\preflate_dll.dll
xtool.exe inject _libraries\zlibwapi.dll

And I want to replace only one a new version fast-lzma2.dll, then:
xtool.exe inject _libraries\fast-lzma2.dll

Or probably, every time there is a new version of xtool, you need to create a new integration.

3. Yes.

elit 17-07-2022 18:15

1 Attachment(s)
I have found something that seem like a bug, and I am not sure if its FA or xtool, but likely an xtool issue.

Say you precomp a file with reflate, but you have an xtool.ini config that contain all kind of codecs, like xmemcompress, quickbms based and so on. But you only used reflate.

Now to decode successfully, you have to have all those exe files + untouched xtool.ini otherwise xtool will throw general error! Even if you don't need any of those for decompression.
That just happened to me. I had to copy all those pointless exe's and exact same xtool.ini for it to work. If for example I edited out those unneeded codecs from xtool.ini and/or deleted crilayla.exe or xmemcompress.exe, then xtool won't decode my reflate pack!

EDIT: No wonder it fails:
Attachment 32214
Why it have to save all those things if it's not needed?

Razor12911 17-07-2022 22:24

Quote:

Originally Posted by elit (Post 497662)
I have found something that seem like a bug, and I am not sure if its FA or xtool, but likely an xtool issue.

Say you precomp a file with reflate, but you have an xtool.ini config that contain all kind of codecs, like xmemcompress, quickbms based and so on. But you only used reflate.

Now to decode successfully, you have to have all those exe files + untouched xtool.ini otherwise xtool will throw general error! Even if you don't need any of those for decompression.
That just happened to me. I had to copy all those pointless exe's and exact same xtool.ini for it to work. If for example I edited out those unneeded codecs from xtool.ini and/or deleted crilayla.exe or xmemcompress.exe, then xtool won't decode my reflate pack!

EDIT: No wonder it fails:
Attachment 32214
Why it have to save all those things if it's not needed?

Xtool stores all possible methods because xtool itself doesn't know if are or will be used if all before even precompression begins.

Razor12911 17-07-2022 22:29

Quote:

Originally Posted by Cesar82 (Post 497636)
@Razor12911, thank you very much for the constant updates.

1) Is it possible to update the previously injected libraries?
2) XTool 0.3.21 has been removed from the main post... Will we have updates for the remaining plugins soon?
3) Is it necessary to include the "fast-lzma2.dll" library to use xtool's lzma2 internal method?
4) What xtool method is the library "xdelta3_dll.dll" from the _libraries folder used for?

1) yes
2) possibly, in the main post there is actually link to the older releases I just removed 0.3.21 to make people not ask what is the different between this version and the recent update.
3) yes
4) imperfect streams use xdelta for patching, this function initially came from a dll but I separated all dlls from the main executable and gave the options to the user to include such a feature.

elit 21-07-2022 02:50

reflate issues: some more info
 
1 Attachment(s)
Greetings Razor.
Back on page 34 where I wrote about reflate problems, causing crc errors... This time I was able to catch in on console:

Attachment 32246

But the thing is, exact same run may pass successfully on second or more tries(and then maybe fail again, so random dice per run). I am starting to be cautious about HW issue possibility on my side, but then I had no such issues with zlib yet. Using -t8.

Looks like either thread race issue, or my HW memory. This is on xtool v0.5.3. I will investigate this further.

EDIT:
Latest v0.6.2 == same issue.
If xtool do not fail during compression(precomp), then it will always recompress successfully during unpacking - i.e. probably not HW issue after all.
Last stable version without this bug that I have is 0.3.21. Cannot replicate on it. I believe this one is stable.[Its not, later I found..] Unfortunately it miss a lot of streams that newer xtool-reflate can see.
EDIT2:
Forgot to add. Changing chunk size(or not using depth) can help sometimes, but on big enough data stream one chunk size may pass at one point and fail at different one(where again some other size could work and so on). Also, I started having these issues only recently which correspond with me upgrading to later xtool version than I was stuck with.
Also, I think this have way more likelihood of happening on files that do not contain(or very little) deflate chunks. When FA reported CRC fails it was pretty much files that happen to share same extension with those that do.
EDIT3:
Yup, not my HW. I just threw whole Halo Master Collection directory to xtool 0.3.21(without filter) and it completed successfully. Then I tried both v0.5.3 and v0.6.2 and it failed on address violation.
EDIT4:
I will further confirm it later here, but using -lm *may* work as a workaround for reflate. Not due to a memory shortage, but the way chunks/data and threads are handled. No, it didn't help. [ADD: neither did -t1]
EDIT5:
Preflate works without issues, so I had to settle with it. Final repack size is ~1gb bigger though. I do hope reflate get fixed in the future as I prefer it.

Razor12911 25-07-2022 08:42

samples?

elit 26-07-2022 03:18

Quote:

Originally Posted by Razor12911 (Post 497745)
samples?

Unfortunately this wouldn't be possible, it need to be tested on whole Halo Master Collection directory. Because you are unlikely to trigger on small data. Even different arrangement of files(sorting) or chunk size can affect where or if the issue happen at all. Closest I was able to get for smaller data sample were 3 ipak files which is still ~1gb and less reliable to replicate. This could be a rare byte sequence that cause this. And if so I don't know if it's within reflate dll or xtool.
Best way to test is to run it on whole Halo MCC directory without any filter(all files), even better with FA gui instead cmd. That is the closest I know.

L33THAK0R 06-08-2022 03:15

Is there a list of every valid codec/method that XTool supports? I'm talking about the ones outside of the codecs listed in the included documentation. It seems like a silly question but I havent kept that close an eye on XTool's development and with the dropping of GrittiBanzli support just thought I'd see if anyone has an up-to date list.

Snake288 07-08-2022 10:04

Hello Razor12911
Dying Light 2 Stay Human compression XTool 2020 (Database you can provide support ?
Dying Light 2 Stay Human example Data
https://lifeboxtransfer.com/s/5d1043...d-ee4116099aea

KaktoR 07-08-2022 10:24

Quote:

Originally Posted by L33THAK0R (Post 497877)
Is there a list of every valid codec/method that XTool supports? I'm talking about the ones outside of the codecs listed in the included documentation. It seems like a silly question but I havent kept that close an eye on XTool's development and with the dropping of GrittiBanzli support just thought I'd see if anyone has an up-to date list.

-mpng (have to be used with -d1 parameter and reflate/preflate afterwards)
-mflac
-mbrunsli
-mjojpeg
-mpackjpg

KaktoR 07-08-2022 10:42

Quote:

Originally Posted by Snake288 (Post 497887)
Hello Razor12911
Dying Light 2 Stay Human compression XTool 2020 (Database you can provide support ?
Dying Light 2 Stay Human example Data
https://lifeboxtransfer.com/s/5d1043...d-ee4116099aea

Did they change compression? I'm sure in some older version of this game they used just zlib or sort of if I remember correctly.

dixen 07-08-2022 14:14

Quote:

Originally Posted by KaktoR (Post 497889)
Did they change compression? I'm sure in some older version of this game they used just zlib or sort of if I remember correctly.

No changes. ZLIB only in 2 *.pak files. RPACK is no compression

panker1992 26-08-2022 06:21

External Codec Error
 
1 Attachment(s)
Hello, it's been ages since i had an error !!

This Came directly from Xtool documentation
Xtool version used 6.2

this is my wav.ini
[Stream1]
Name=wav
Codec=wavpack
BigEndian=0
Signature=0x46464952
Structure=Signature(4),FileSize(4),FileType(4),Str eam
StreamOffset=-12
CompressedSize=FileSize + 8
DecompressedSize=0
Condition1=FileType = 0x45564157
Condition2=FileSize >= 4096

this is my xtool.ini
[wavpack]
Encode=wavpack.exe -hh -x4 <filein>.wav <fileout>.wv
Decode=wvunpack.exe <filein>.wv <fileout>.wav

i have been unable to make this even detect the sample FLAC internal codec works and so any other
NOTE: i use this as standalone and not in FA for testing purposes

Edison007 26-08-2022 07:52

xtool.ini:

[wavpack]
Encode=wavpack.exe -hh -x4 <filein> <fileout>
Decode=wvunpack.exe <filein> <fileout>

or

[wavpack]
Encode=wavpack.exe -hh -x4 - - <stdin> <stdout>
Decode=wvunpack.exe - - <stdin> <stdout>

panker1992 26-08-2022 08:26

Quote:

Originally Posted by Edison007 (Post 498092)
xtool.ini:

[wavpack]
Encode=wavpack.exe -hh -x4 <filein> <fileout>
Decode=wvunpack.exe <filein> <fileout>

or

[wavpack]
Encode=wavpack.exe -hh -x4 - - <stdin> <stdout>
Decode=wvunpack.exe - - <stdin> <stdout>

i Spoke with Zee :D

it's a bug confirmed, it's been fixed already

Razor12911 05-09-2022 02:16

Update available

Changes

- added universal lz4f scanner
- fixed issues with database feature
- fixed issues with executable plugin support
- updated lzo codecs

Razor12911 06-09-2022 04:55

Update available

Changes

- fixed issues with lzo2a and lzo1c codecs

dixen 06-09-2022 05:26

XTool v 0.6.4

Code:

[0] Processed lzo2a stream at 00000000199339FB (6669 >> 32768 >> 6669) using v999 successfully
[0] Processed lzo2a stream at 000000001993540C (6953 >> 32768 >> 6953) using v999 successfully
[0] Processed lzo2a stream at 0000000019936F39 (6965 >> 32768 >> 6965) using v999 successfully
[0] Processed lzo2a stream at 0000000019938A72 (7049 >> 32768 >> 7049) using v999 successfully
[0] Processed lzo2a stream at 000000001993A5FF (7357 >> 32768 >> 7357) using v999 successfully
[0] Processed lzo2a stream at 000000001993C2C0 (6483 >> 32768 >> 6483) using v999 successfully
[0] Processed lzo2a stream at 000000001993DC17 (6438 >> 32768 >> 6438) using v999 successfully
[0] Processed lzo2a stream at 000000001993F541 (7049 >> 32768 >> 7049) using v999 successfully
[0] Processed lzo2a stream at 00000000199410CE (10483 >> 32768 >> 10483) using v999 successfully
[0] Processed lzo2a stream at 00000000199439C5 (9063 >> 32768 >> 9063) using v999 successfully
[0] Processed lzo2a stream at 0000000019945D30 (11212 >> 32768 >> 11212) using v999 successfully
[0] Processed lzo2a stream at 0000000019948900 (13262 >> 32768 >> 13262) using v999 successfully
[0] Processed lzo2a stream at 000000001994BCD2 (19921 >> 32768 >> 19921) using v999 successfully
[0] Processed lzo2a stream at 0000000019950AA7 (14134 >> 32768 >> 14134) using v999 successfully
[0] Processed lzo2a stream at 00000000199541E1 (15579 >> 26778 >> 15579) using v999 successfully

Streams: 22550/22550
Time: 00:00:41 (00:00:38)
Memory: 264 MB (264 MB)


Errorlevel=0

Compressed 1 file, 429,260,800 => 829,963,641 bytes. Ratio 193.35%
Compression time: cpu 0.33 sec/real 42.34 sec = 1%. Speed 10.14 mB/s
All OK


Razor12911 09-09-2022 00:19

Update available

Changes

- updated oodle scanner
- remove xdelta support from oodle and lzo codecs (crc mismatch often generates large diff files)

Notes

I've been getting reports of xtool taking a long time to process oodle streams (or getting stuck) so I reworked the scanner. I reverse engineered the code of oo2rec (I lost the source code) and rewrote parts of the code so xtool should produce better results while being faster.

There is a parameter rework as well, some people may know of the "n#" parameter which when set increases the chances of xtool capturing a stream. The default value now is 32, can be increased to 64, 128... Up to you, there is no limit just keep in mind that increasing this value also means longer precompression times.

Results on DOOM Eternal's "gameresources_4_1.streamdb"

oo2reck
Code:

Compressed 1 file, 1,353,405,353 => 2,584,084,262 bytes. Ratio 190.93%
Compression time: cpu 1.86 sec/real 590.20 sec = 0%. Speed 2.29 mB/s

xtool 0.4.7-0.6.4
Rumour has it that it's still processing as we speak (stuck on 5.7%) :rolleyes:

xtool 0.6.5 (-mkraken:l6:n128)
Code:

Compressed 1 file, 1,353,405,353 => 2,589,860,614 bytes. Ratio 191.36%
Compression time: cpu 1.80 sec/real 370.32 sec = 0%. Speed 3.65 mB/s


panker1992 10-09-2022 03:29

Quote:

Originally Posted by Razor12911 (Post 498253)
Update available

Changes

- updated oodle scanner
- remove xdelta support from oodle and lzo codecs (crc mismatch often generates large diff files)

Notes

I've been getting reports of xtool taking a long time to process oodle streams (or getting stuck) so I reworked the scanner. I reverse engineered the code of oo2rec (I lost the source code) and rewrote parts of the code so xtool should produce better results while being faster.

There is a parameter rework as well, some people may know of the "n#" parameter which when set increases the chances of xtool capturing a stream. The default value now is 32, can be increased to 64, 128... Up to you, there is no limit just keep in mind that increasing this value also means longer precompression times.

Results on DOOM Eternal's "gameresources_4_1.streamdb"

oo2reck
Code:

Compressed 1 file, 1,353,405,353 => 2,584,084,262 bytes. Ratio 190.93%
Compression time: cpu 1.86 sec/real 590.20 sec = 0%. Speed 2.29 mB/s

xtool 0.4.7-0.6.4
Rumour has it that it's still processing as we speak (stuck on 5.7%) :rolleyes:

xtool 0.6.5 (-mkraken:l6:n128)
Code:

Compressed 1 file, 1,353,405,353 => 2,589,860,614 bytes. Ratio 191.36%
Compression time: cpu 1.80 sec/real 370.32 sec = 0%. Speed 3.65 mB/s



it's fixed :P , adding one big file and all libraries inside along with all versions of xtool isnt a good idea

kuyhaa 15-09-2022 08:07

confiused . .

xt 065 , ( same result with other version )

https://blogger.googleusercontent.co...147/frusta.png

shazzla 28-09-2022 10:20

Hi guys!

I need a little help....
Something is wrong here. Tried to precomp a file with deduplication ,but XTool 0.6.5 doesnt make it. It looks like it ignores the corresponding parameter,even .bin file not created! V0.3.1 works fine!
What am i do wrong?


[External compressor:x065-dedup]
header = 0
packcmd = xtool065\xtool.exe precomp -mzlib -c32mb -t100p --dbase --dedup=chor065.bin - - <stdin> <stdout>

[External compressor:x065-nodedup]
header = 0
packcmd = xtool065\xtool.exe precomp -mzlib -c32mb -t100p - - <stdin> <stdout>

[External compressor:x031-dedup]
header = 0
packcmd = xtool031\xtool.exe precomp -mzlib -c32mb -t100p --dbase --dedup=chor031.bin - - <stdin> <stdout>

[External compressor:x031-nodedup]
header = 0
packcmd = xtool031\xtool.exe precomp -mzlib -c32mb -t100p - - <stdin> <stdout>

Results :

Xtool 0.3.1 ,deduplicated : 40.2 GB
Xtool 0.3.1 ,not deduplicated : 42.9 GB

Xtool 0.6.5 ,deduplicated : 42.9 GB
Xtool 0.6.5 ,not deduplicated : 42.9 GB

All processes finished without error. V0.6.5 is the "pure" version ,directly from Zee's ZIP-file...

Btw where to insert --verbose command?
Only one place is accepted in my experiments ,but no verbose infos are displayed...

Masquerade 28-09-2022 10:30

Quote:

Originally Posted by shazzla (Post 498542)
Btw where to insert --verbose command?
Only one place is accepted in my experiments ,but no verbose infos are displayed...

Only use --verbose for testing. It limits XTool to 1 chunk processed at once. Add it before input / output. You shouldn't combine stdin/stdout with --verbose, use $$arcdatafile$$.tmp/$$arcpackedfile$$.tmp instead.

KaktoR 28-09-2022 10:55

You can make a batch file near xtool.exe and drag&drop a file onto it. This way you don't use freearc for it.

Example
Code:

@echo off
cd /D "%~dp0"
xtool.exe precomp -mzlib -c16mb -t100p --verbose - - < %1 > %1.out
pause


shazzla 03-10-2022 09:29

Nobody ? :(

Found. Damn...
Parameters were changed...

L33THAK0R 14-10-2022 08:18

Quick question, or I guess just asking for some clarification, in regards to "bms2xtl", can you only process a given file with your generated database, if the codec is one that xtool supports? So for example xtool wouldn't be able to process a COMTYPE if it isn't deflate, lz4(hc/x/f)... etc.? I guess what I'm asking in essence is am I correct in saying external, quickbms-native COMTYPEs aren't supported.

Masquerade 14-10-2022 11:17

Quote:

Originally Posted by L33THAK0R (Post 498708)
Quick question, or I guess just asking for some clarification, in regards to "bms2xtl", can you only process a given file with your generated database, if the codec is one that xtool supports? So for example xtool wouldn't be able to process a COMTYPE if it isn't deflate, lz4(hc/x/f)... etc.? I guess what I'm asking in essence is am I correct in saying external, quickbms-native COMTYPEs aren't supported.

Use xtool.ini to add COMTYPEs that QuickBMS supports. Bear in mind that QuickBMS built in compression can vary wildly from that of what the original input file is compressed with so this is really only suitable for encryption algorithms where you're more likely to get a correct output.

Also, not every algorithm that QBMS can decompress it can also compress - such as LZ2K, of which no compression code exists publicly.

You also have totally different implementations of algos althogether such as LZSS where it's basically different every time you see it.

In short xtool.ini compression with QuickBMS is hit/miss.

shazzla 15-10-2022 04:59

Hi!

How can i pass the --dedup parameter into the -m chain ?

Masquerade 15-10-2022 05:31

Quote:

Originally Posted by shazzla (Post 498712)
Hi!

How can i pass the --dedup parameter into the -m chain ?

Just put --dedup into XTool packcmd in arc.ini.

shazzla 15-10-2022 06:40

Currently using that method. Is it possible to pass --dedup ?!

dixen 15-10-2022 07:24

Quote:

Originally Posted by shazzla (Post 498715)
Currently using that method. Is it possible to pass --dedup ?!

Just delete --dedup


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

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