PDA

View Full Version : AFR (Anvil Forge Recompressor)


oltjon
16-10-2017, 16:17
AFR (Anvil Forge Recompressor) - The forge-container recompressor

A recompressor for .forge (scimitar) containers from games on the Anvil Engine (mostly Assassin's creed series).
Implemented multi-threaded recovery and cls-filter for FreeArc.
cls-afr.dll supports the Threads key in the cls.ini file - specifies the number of threads to restore. Default: NumCPU-1, maximum: 16.


// Comparison with a 64-bit version of ztool (plzo).
Unpacking time:

tell your opinions


thanks Edison007 for this tool


https://mega.nz/#!9yRlybYB!D_U30YjANsTyRulKRzfFWrUAl_EFGLAXwbJHpEV-9lA

danswano
18-10-2017, 11:38
Here is the recent version, credit to Edison007.

oltjon
22-10-2017, 05:32
small update.

added -dc option (disables LZO check for decompression, processing is slightly faster, but on broken (?) archives with it will be APPCRASH).
added in some places of verification.
code refactoring.
cosmetic changes.
added to the set arc.ini (I did not think that it would be difficult to write one line in the ini, meh).

credit to Edison007.

KaktoR
22-10-2017, 06:00
Thank you. Wasn't aware of that.

Will test soon.

KaktoR
01-11-2017, 09:14
afr:a2
Compressed block count (subblocks) = 4168 (59251)
LZO1X-W3(15) subblocks count = 0
LZO1X-999 subblocks count = 41043
LZO2A-999 subblocks count = 0
LZO1C-999 subblocks count = 0
Uncompressed subblocks count = 18208

Compressed subblocks size: 981113389 -> 1323071148
Uncompressed subblocks size: 505081644
Other data size: 1399003

Total data+table: 1487831040 -> 1830059387

WARNING! In file found corrupted LZO-streams. Check your data!

Edit:
Compression time with AFR:a2 was quiet fast, only ~2 minutes more.
https://i.imgur.com/g7umKUY.png

Unpacking time was slower than standard compression, but not that much: ~2 minutes more.
https://i.imgur.com/AIz7PqD.png
MD5 Check was fine too.

Will test some more.

KaktoR
01-11-2017, 11:01
Another test with very big data

-------------------------------------------------------------------
Compressed block count (subblocks) = 196168 (1276451)
LZO1X-W3(15) subblocks count = 16738
LZO1X-999 subblocks count = 1068641
LZO2A-999 subblocks count = 0
LZO1C-999 subblocks count = 0
Uncompressed subblocks count = 191072

Compressed subblocks size: 15970647521 -> 32687257445
Uncompressed subblocks size: 3858606509
Other data size: 151950822

Total data+table: 19986310656 -> 36709629424

WARNING! In file found corrupted LZO-streams. Check your data!

Time: 1634.073 secs


Errorlevel=0
9.9%
Compressing 36,709,341,539 bytes with _Compressors\SREP64 -m3f Input Output
9.9%SREP 3.92 beta (July 23, 2013): input size 35008 mb, memory used 2713 mb, -m3f -l512 -c512 -a4/4 -hash=vmac -b8mb
100%: 36,709,341,539 -> 15,088,619,311: 41.10%. Cpu 170 mb/s (205.688 sec), real 103 mb/s (339.510 sec) 9.9%
Sorting matches... Second pass 100.0%

Will report back soon...

Edit: Unpacking was OK, but took over 30 minutes (unfortunately haven't count the time exactly...).

KaktoR
01-11-2017, 16:01
Another test. Previous test was OK (see Edit).

-------------------------------------------------------------------
Compressed block count (subblocks) = 300214 (1181278)
LZO1X-W3(15) subblocks count = 0
LZO1X-999 subblocks count = 942635
LZO2A-999 subblocks count = 0
LZO1C-999 subblocks count = 0
Uncompressed subblocks count = 238643

Compressed subblocks size: 14949576065 -> 25849003845
Uncompressed subblocks size: 4192660686
Other data size: 822001363

Total data+table: 19968963226 -> 30875715102

WARNING! In file found corrupted LZO-streams. Check your data!

Time: 1356.039 secs


Errorlevel=0
10.0%
Compressing 30,875,131,802 bytes with _Compressors\SREP64 -m3f Input Output
10.0%SREP 3.92 beta (July 23, 2013): input size 29444 mb, memory used 2196 mb, -m3f -l512 -c512 -a4/4 -hash=vmac -b8mb
100%: 30,875,131,802 -> 7,407,115,894: 23.99%. Cpu 192 mb/s (153.406 sec), real 104 mb/s (283.003 sec) 10.0% %
Sorting matches... Second pass 100.0%

KaktoR
02-11-2017, 06:19
Doesn't work for Origins. Well, Origins use a different engine. Maybe 2.5 or 3.0

Andu21
02-11-2017, 07:16
The author is working on that, there's an alpha version if you want to try.

KaktoR
02-11-2017, 08:10
Can't read russian properly. Could you link me the file with PM or a direct link?

KaktoR
06-12-2017, 07:07
Any progress of it?

Or is it now just private like other tools?

doofoo24
24-12-2017, 22:36
testing afr:a2 on ac unity and syndicate forge file...
ac uinty afr:a2 40.1gb to 51.3gb with srep+lzma 27.5gb
ac syndicate 54.2gb to 84.4gb with srep+lzma 13.1gb
work great...
the setting afr:a2+srep:m3f:a2+lzma:a1:mfbt4:d384m:fb273:mc100 00:lc8

* note if i use 4x4:lzma the setup always crash while if i use ztool with 4x4:lzma it mange to decompress faster...
GREAT TOOL AFR is there update to work on game like far cry 4/wath dog ?

Simorq
25-12-2017, 05:52
testing afr:a2 on ac unity and syndicate forge file...
ac uinty afr:a2 40.1gb to 51.3gb with srep+lzma 27.5gb
ac syndicate 54.2gb to 84.4gb with srep+lzma 13.1gb
work great...
the setting afr:a2+srep:m3f:a2+lzma:a1:mfbt4:d384m:fb273:mc100 00:lc8

* note if i use 4x4:lzma the setup always crash while if i use ztool with 4x4:lzma it mange to decompress faster...
GREAT TOOL AFR is there update to work on game like far cry 4/wath dog ?

SrepInit('',512,0) to SrepInit('',128,0) no crash

doofoo24
25-12-2017, 07:26
SrepInit('',512,0) to SrepInit('',128,0) no crash

but it will write more temp data and will take more time, the whole point for using 4x4 is to increase speed and save time btw i'm using 1024 for srep...

Simorq
25-12-2017, 08:20
but it will write more temp data and will take more time, the whole point for using 4x4 is to increase speed and save time btw i'm using 1024 for srep...

There is not much difference between 1024 and 128.
More speed is achieved with Srep64.

KaktoR
25-12-2017, 11:23
What about 256 instead? Will it crash?

doofoo24
27-12-2017, 10:13
* note if i use 4x4:lzma the setup always crash while if i use ztool with

the problem is in cls-afr it work well if i use 1 or 2 thread for afr
SaveStringToFile(ExpandConstant('{tmp}\cls.ini'), '[afr]'+#13#10+'Threads=1', True);

otherwise if i use more threads witch 4x4:lzma it crash...
*if i use lzma without 4x4 and remove the threads count it work will the setup(afr) cpu usage almost 100%

Mini
27-12-2017, 14:22
[Setup]
AppName=My Program
AppVerName=My Program v 1.7
DefaultDirName={pf}\My Program
OutputBaseFilename=example
OutputDir=.

[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl

[Code]
type
TSystemInfo = record
wProcessorArchitecture: Word;
wReserved: Word;
dwPageSize: DWORD;
lpMinimumApplicationAddress: Integer;
lpMaximumApplicationAddress: Integer;
dwActiveProcessorMask: DWORD;
dwNumberOfProcessors: DWORD;
dwProcessorType: DWORD;
dwAllocationGranularity: DWORD;
wProcessorLevel: Integer;
wProcessorRevision: Word;
end;

procedure GetSystemInfo(var lpSystemInfo: TSystemInfo); external '[email protected] stdcall';

procedure InitializeWizard();
var
SysInfo: TSystemInfo;
Threads: Integer;
begin
GetSystemInfo(SysInfo);
Threads:= SysInfo.dwNumberOfProcessors;

SetIniString('Afr', 'Threads', IntToStr(Threads), ExpandConstant('{tmp}\cls.ini'));
end;

doofoo24
27-12-2017, 22:34
so it work cls afr the same number of threads as the system but sometime i get setup has stop working in the beginning ?
* it's seems to be from isdone if i put afr data first i get this error but if i put different data that did't use afr first and put afr data second seems to fix the problem...

ISArcExtract ( 0, 1, ExpandConstant('{src}\Setup-2.arc'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), False) then break; (here i compress game file like exe/bik)
ISArcExtract ( 0, 99, ExpandConstant('{src}\Setup-1.arc'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), False) then break; (here only forge file)

seems to fix the problem that i have...
AFR work GREAT
other test i done ON FORGE FILE only
ac 1 i get 1.10 gb
ac liberation 820mb

doofoo24
04-01-2018, 13:08
does anyone try to install the new security update for windows for intel processor ?
because i am getting this error when i try to decompress is it srep or afr or inno ?

doofoo24
04-01-2018, 14:29
so the problem trun to be from the old cls-srep...
using the new srep from ProFrager (cls_srep_v0.03b) seem to fix the problem now no temp file super fast...
BIG BIG THANK TO ProFrager...

ZakirAhmad
04-01-2018, 19:09
is AFR going to include other lzo game engines like Dunia, Unreal engine etc.

Andu21
05-01-2018, 04:47
is AFR going to include other lzo game engines like Dunia, Unreal engine etc.
I don't think so, it's called Anvil Forge Recompressor for a reason.

For an Unreal recompressor use: http://fileforums.com/showthread.php?t=99953

doofoo24
07-01-2018, 02:31
does anyone encounter error when using afr in decompression ?
seems to be memory issues...

ZakirAhmad
10-01-2018, 09:41
i encountered archieve data correpted in assassins creed 1

oltjon
30-01-2018, 13:53
Another alpha, just added support for containers from the updated R6S (ZSTD-streams). I did not fix any bugs, and CLS did not do it.
I did it for a long time, now I just recompiled, like the odd works.

For the old games, use stable (019 version), this one is only to be pampered
CREDIT
Edison007

danswano
04-02-2018, 06:38
There is no progress bar when using arf_x64.exe to unpack?

Simorq
04-02-2018, 06:52
There is no progress bar when using arf_x64.exe to unpack?
not be support for stdin/out

danswano
04-02-2018, 06:59
So there is no way to use afr with progress bar for ACO now?

drsanjula
05-02-2018, 05:48
Does this work with ACOrigins?

ZakirAhmad
12-02-2018, 20:01
is AFR source public, if yes please give a link.

elit
14-02-2018, 06:30
I apologize if this was answered somewhere already, but how does this compare to ztool:lzo? That combo used to be working for anvil/forge games. Does this pre-compress any games that ztool won't? Or detect more streams?
Thanks.

Does this work with ACOrigins?
FitGirl just used it for that game so it does.

Schabik
19-02-2019, 05:31
Hey there, can I use AFR 20A7 for compression and use CLS-AFR for unpack?

doofoo24
19-02-2019, 05:50
Hey there, can I use AFR 20A7 for compression and use CLS-AFR for unpack?

yes you can...

for compression games like (origin/odyssey)
use afr 20a7
[External compressor:afr]
header = 0
packcmd = afr.exe e -a2 $$arcdatafile$$.tmp $$arcpackedfile$$.tmp

but you need alot of free space for temp files like 400gb

for installation use the cls from razor...

Schabik
19-02-2019, 05:52
yes you can...

for compression games like (origin/odyssey)
use afr 20a7
[External compressor:afr]
header = 0
packcmd = afr.exe e -a2 $$arcdatafile$$.tmp $$arcpackedfile$$.tmp

but you need alot of free space for temp files like 400gb

for installation use the cls from razor...


I'm talking about Assassins creed Directors Cut with Scimitar

doofoo24
19-02-2019, 05:57
I'm talking about Assassins creed Directors Cut with Scimitar

for that just use afr 0.19

[External compressor:afr]
header = 0
packcmd = afr.exe e {options} $$arcdatafile$$.tmp $$arcpackedfile$$.tmp

cls-afr from razor should work it's the same thing...

rahul159
10-05-2020, 00:37
When I try to decompress any afr method with any inno script all give same error "Unarc.dll returned an error code:-11".

My arc.ini - [External compressor:afr]
header = 0
unpackcmd = AFR_x64.exe d #in #out <stdin> <stdout>

Please anyone help

Schabik
10-05-2020, 00:45
Replace afr_x64.exe that is used for decompression with the one that everyone uses for compression, it will work. I had the same problem with ASIS and it helped me.

montie
08-05-2023, 00:21
Привет, я хочу распаковать ресурсы For Honor
скажите как мне это сделать?
я запускал x64 файл, окно или консоль не открывается. Точнее открывается на долю секунды
Так же я копировал .forge файлы в папку с рекомпрессором

KaktoR
08-05-2023, 04:45
I think .forge files from "For Honor" are encrypted/protected, so AFR doesn't work for them.