FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   lzma2 on freearc as external (https://fileforums.com/showthread.php?t=97325)

panker1992 10-11-2015 15:06

PRECOMP+MSC+SREP+LZMA2 or (ZSTD, LZHAM)
 
6 Attachment(s)
Finally, after working on this one for about 2 months, I managed to use lzma2 as external command for freearc.
It uses cpu to the limit so expect a full 4 times faster compression, please consider to share any settings you might find that does improve this method :D enjoy !!!

Properly Intro zstd

~~~~~> Check Pic Below <~~~~~
Metal Gear Solid 5
Method: srep64+zstd 19 Gigs total file
Decompressed in less that 3 minutes
Decomp Speed 275 mb/sec


well for those who have used my method you might have seen a compressor named zstd
since i havent seen anyone using it before, i will right down here what it does and how to use
like my lzma2 method it supports stdin and stdout, so decomp starts within seconds from data*.bin.
zstd is a poor compressor and its usage isnt for compressing but storing data that cannot be further compressed lossless
its capable of delivering 490mb/sec per thread... meaning a full 1.8 giga/sec on an 4 core cpu; assuming you dont have a bottlenech on
i/o(aka HDD/SSD).
Just for the record srep64 can deliver a full 1giga/sec, thus making srep64+zstd method a really bad @ss method to use.
hope you like it and use it.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Properly Intro lzham
Lzham just like lzma2 is a heavy compressor, the reason i have chose to upload this tool is because i have seen that uses 55% less ram than lzma2.
Thus making it a reasonable tool for those that utilize 8 gigs of ram or less
The ratio is 0.20% bigger nothing to worry there...Decomp speed is a little bit faster than lzma2 ..or that least for my pc !!!!
and of course ... i kept this for last !! :P it utilizes andler32 (something similar to checksum for those familiar with this )
ENJOY :)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Update 1:
Added inno to make it work all in one go !!!
This is from Kurutcu v 1.8 blackbox all credits for this goes to him.
well you need to modify it to support your given password and the number of bin files you created !!! more of this later !!!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[ Compressing Tutorial ]
Well as i got too many requests for a tutorial i decided even now to share one with you!!
how to use this:
1)) select a game you want to compress then
2) decide how to make ex: put all videos and data that generally doesnt compress well in 1 folder and all other data that will compress heavily into folder 2
A) method selection examples max compression: -mprecomp+msc+srep64+xz or fast decompression for data that doesnt compress: -mmsc+srep64+zstd
B) put there the path to the folder you want to compress
C) the number of bin files data1.bin, data2.bin ......data4.bin etc..
D) you can name data1.bin or data1.arc or data1.cab choose whatever you want. i prefer bin files :P
E: you can choose to have password protected data or not its your decision to make i use password to my bins
3) after you have done that you can you save the bat file and run it !!!

[ Decompression Tutorial ]
A1) The name of your data files example: if you made data1.bin and data2.bin then uncomment 2 lines of code for data1 and data2
B1) If you have used password on compression it must be reverse-used to decompress them as well, put it there i have shown on pic !!
C1) This is the progressbar detector if you have 1 file then 100% goes to one file if you have 2 files 50 for one and another 50 for the other.
{REMEMBER} you can have 7 bin files or whatever you want, make sure when you sum this up you need to have 100 combined

A2) The name of the exe file in your game folder, this is used to make a desktop shortcut so be careful its case sensitive
B2) The amount of space that the game reserves, in this case lords of the fallen takes 17 gigs* so the amount that you point there is the amount of megabytes
plus 1000 more to point correctly!!!
C2) The name of the game and the name of the folder that this inno will create...

PS: All tools and Inno Setup have been updated!!! also made some corrections.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Properly Intro Bink and Bk2 Encoding

Just as i promised that i will keep updating this thread.
I will show you how to properly make some lossy compression in order to achieve even greater Ratios.
i wrote down that Script myself in order to take bik and bk files as input and properly reduce them without you making a fuss..

This script is optimised to Show how many inputs you inserted and show progress while processing them thus its title will show at which
bink or bk file it is, also i made that it deletes the input file after compression in order to save time.

~~~~~~ Here is How to use ~~~~~~

Place the bat files and bink.exe inside a folder that you make along with the files.
then run bink_enc or bk2_enc depending which type you are Rebuilding. make sure you back up files just in case!!!

Enjoy !!! :D

THIS TOPIC IS MOVED PERMANENTLY ON MY NEW MASKED COMPRESSION THREAD

kenzo34 11-11-2015 03:35

thank you very good job. good result and the speed is faster. what should is the bat file to decompress? I try with this command:. arc.exe x -w \ -dpunpacked \ "data1.bin" but I found an error

panker1992 11-11-2015 04:26

Quote:

Originally Posted by kenzo34 (Post 444488)
thank you very good job. good result and the speed is faster. what should is the bat file to decompress? I try with this command:. arc.exe x -w \ -dpunpacked \ "data1.bin" but I found an error

you will need unarc.exe or arc.exe to do the unpacking
therefore these are the commands
unarc x -pyourpassword -o+ data1.bin (optional command -dpFOLDER) to extract into a specific folder

arc x data1.bin -y -pYourpassword


or you can modify kurutcus 1.8 to extract from there i will be uploading ways to extract if you ask for them both inno and ripping


PS1: the error is either password error or you need to rename 7z.exe ~> dec.exe using 7z.dll as well ... or copy paste and replace with the update 1 i provided

kenzo34 11-11-2015 05:08

thank's you panker1992 I like your compression method.
I will try with your board
Thank you

panker1992 11-11-2015 05:16

this is a result of a very hard work lzma2 is hard to work on command line. tho i have to admit that part of this inspiration came from razor's work i wanted to use this with cls-reflater.dll !! lets see if people decide to use this method on mine :)

Carldric Clement 11-11-2015 05:26

Quote:

Originally Posted by panker1992 (Post 444472)
Finally, after working on this one for about 2 months, I managed to use lzma2 as external command for freearc. It uses cpu to the limit so expect a full 4 times faster compression, please consider to share any settings you might find that does improve this method :D enjoy !!!


update1:
[External compressor:xz]
;lzma2:mfbt4:d27:fb128:mc1000 ;-m1=lzma2:fb=256
header = 0
packcmd = 7z a -txz -an -mcrc=0 -mx9 -m1=lzma2:d27:fb=273:mf=bt4:mc=1000 -mmt=on -si -so <stdin> <stdout>
unpackcmd = 7z x -txz -an -y -si -so <stdin> <stdout>

Very well bro.
I think i got idea to test with isdone installer.

kenzo34 11-11-2015 05:29

it would be great if you could combine your method with reflate. Bravo for your work sincerely

panker1992 11-11-2015 06:01

Quote:

Originally Posted by Carldric Clement (Post 444495)
Very well bro.
I think i got idea to test with isdone installer.


my method supports stdin and stdout so it works with isdone i have tested it ;) i will be uploading 2 ways to use it effectively so no worries ;)

ShadowEagle 11-11-2015 06:08

Quote:

Originally Posted by panker1992 (Post 444498)
my method supports stdin and stdout so it works with isdone i have tested it ;) i will be uploading 2 ways to use it effectively so no worries ;)

Excited to combine / integrate it into UltraARC :cool:

panker1992 11-11-2015 06:55

use my method with the inno i provided above so you will see how it performs on stdin and stdout compared to just lzma :P soon i will be providing the other method. This inno supports precomp+msc+srep64+xz all in one go stdin to stdout

rinaldo 11-11-2015 16:59

interesting http://fileforums.com/images/icons/icon14.gif

panker1992 12-11-2015 02:02

I want to see results on those method, can anyone post ?? also I will be updating as much as i can so keep an eye on this ;)

gozarck 12-11-2015 15:43

1 Attachment(s)
Hello panker1992 thnks for share your work.
i just add lc4 and lp0 you gain very little bytes in compression.
Quote:

[External compressor:7z]
packcmd = 7z.exe a -t7z -mcrc=0 -m1=lzma2:fb=273:mf=bt4:mc=1000:lc=4:lp0 -mx9 $$arcpackedfile$$.7z $$arcdatafile$$.dll
unpackcmd = 7z.exe x -y $$arcpackedfile$$.7z $$arcdatafile$$.dll
packedfile = $$arcpackedfile$$.7z
datafile = $$arcdatafile$$.dll
if you see the code i use -t7z instead -txz because lzma2 is default compression in 7zip since 2012.
Also i inject your 7z.dll into 7z.exe check the attachment, just drag and drop any file in the bat file to test.

panker1992 12-11-2015 16:46

thanks gozarck :D this method works pretty nice !!! feel free to uploads any settings you have discovered that may improve this ...

PS1: but sorry to disappoint you :P to trick 7z to stdin and stdout xz is the only option i tried for many weeks to make it 7z stdin and stdout and i always got an error in decomp. couldnt make it work at all .. so xz=lzma2 best option available :P plus it supports precomp+msc+srep64 all in one go :P

ShadowEagle 15-11-2015 03:11

How to use it in InnoSetup? I use CIU2 - how to do?

panker1992 15-11-2015 12:57

Quote:

Originally Posted by ShadowEagle (Post 444604)
How to use it in InnoSetup? I use CIU2 - how to do?

I will make a tutorial need a day or two really busy this weekend :)

panker1992 16-11-2015 11:28

ShadowEagle .... i am updating this as fast as i can :P I try my best to make everything right about this one everything is in order so wait a few more days and i will upload many great things for this ....making inno tutorial atm will update again soon !!!

ramazan19833 16-11-2015 12:32

compress: -mmsc+srep64+zstd

Hello, you gave (compression: -mmsc + 64 + zstd srep) Have better code?

panker1992 16-11-2015 12:54

ramazan can you be a little more specific?? i cant understand what you mean :( -mmsc+srep64+zstd works like a charm i have included it in my compressor.7z

ramazan19833 16-11-2015 13:23

We have more powerful ultra Compressor 4.7 GB to 10 GB file lowered

panker1992 16-11-2015 13:26

Quote:

Originally Posted by ramazan19833 (Post 444631)
We have more powerful ultra Compressor 4.7 GB to 10 GB file lowered

can you show us how ?? post your ultra compressor??

ramazan19833 16-11-2015 13:59

Biz daha güçlü ultra Kompresör var

ramazan19833 16-11-2015 14:00

Daha Güçlü Ultra Compressor var ....

ramazan19833 16-11-2015 14:05

mı ?

RamiroCruzo 16-11-2015 23:56

Quote:

Originally Posted by ramazan19833 (Post 444633)
Biz daha güçlü ultra Kompresör var

Quote:

Originally Posted by ramazan19833 (Post 444634)
Daha Güçlü Ultra Compressor var ....

Quote:

Originally Posted by ramazan19833 (Post 444635)
mı ?

English please mate....No Turkish :)

panker1992 17-11-2015 05:34

Quote:

Originally Posted by RamiroCruzo (Post 444638)
English please mate....No Turkish :)

Tutorial is up and running .... let me now if you liked it and if it was any help at all:) took a lot of time to make but may prove time saver for newbies ....

ramazan19833 17-11-2015 06:48

More Powerful Ultra Compressor THERE

panker1992 18-11-2015 18:57

I have done Major updates ... i provided better options for 7z thanks to gozarck i have remade arc.ini both in com and decomp and also i have provided a new tools !! lzham good luck on testing this out !! :)
and i forgot !!! i provided a new pic with zstd under stress !!!!

felice2011 23-11-2015 06:52

Hi panker1992 i can not operate the *XZ method compression with precomp0.43 exists or you know any remedy...

panker1992 23-11-2015 10:38

Well i havent tested precomp0.43 myself but here is a quick tutorial how to.
tho i will tell you the bad side of it beforehand, just so you know!!
precomp0.43 doesnt support stdin-to-stdout support and cls-precomp.dll doesnt utilize in order to make it decompress all in one go, you will spend more time decompressing it but on the other hand you will gain compression on jpg files. with that said i will provide you with a working precomp 0.43 but you will need to make some modifications ..... delete precomp.exe and packjpg_dll.dll from compression folder and inno folders AND delete cls-precomp.dll from inno too. and then replace with this .....

[External compressor:precomp]
header = 0
packcmd = precomp -intense0 -cn- {options} -o$$arcpackedfile$$.tmp $$arcdatafile$$.tmp
unpackcmd = precomp -o$$arcdatafile$$.tmp -r $$arcpackedfile$$.tmp

in both arc.ini inno + compression folders

felice2011 23-11-2015 12:25

I know PreComp 0.43 and its positive and negative side in the compression and decompression.:D
But shit i have had an oversight, i had not inserted the "n" in the line of the *arc.ini files.:o

In fact so
Code:

"packcmd = PreComp -intense0 -c- {options} -o arcpackedfile $$ $$. tmp $$ arcdatafile $$. tmp"
NOT working...

So
Code:

"packcmd = PreComp -intense0 -cn- {options} -o arcpackedfile $$ $$. tmp $$ arcdatafile $$. tmp"
works perfect.:)

Soon i upgrade my program with your method, thank you for your work.;)

panker1992 23-11-2015 12:39

I will be glad to see your work with xz :D
hope you like! it it took almost forever to complete :P

gozarck 23-11-2015 19:00

Panker1992 if you like lzham you need to test lzmh.

panker1992 24-11-2015 05:16

Mr gozarck there are several reasons why i like lzham
~first: its compression is close to lzma
~second: it can decompress x2 ~ up until x8 faster than lzma
~third: has andler32 inside
~fourth: the lzmh i have seen is from 2007 and its state is very beta at the moment

PS: can you show me how to inject dll inside exe files ??? i need to inject lzham.dll inside lzham.exe

PS2: do you have a recent lzmh ?? or and updated version of it ?? if i find a working copy i may as well put it in good use

PS3: i really like your work :) thanks for reflating bat files

gozarck 24-11-2015 11:19

2 Attachment(s)
Panker1992 yes lzmh its old and beta and i have the same version like you. Dont worry about beta versions, remember we are using compressors in alpha version. freearc precomp nz lzham fazip.
and lzham is a very nice project and i give +1 because the project is It is in continuous development.
i use "enigma vitrual box" to inject dll to exe and other things too.
i like your work too, so go on my friend.

panker1992 24-11-2015 12:53

alright, you gave me enough reason to support many tools right now.
tho I find lzham and zstd very complete set of tools .
will test lzmh and update this set of tools as well.
i am currently working on a project called "Masked Injection" you dont know what i am talking about now .... but once its ready you will be amazed, the same feeling i get as i am coming to its beta phase.

Sharing is Caring after all :)

EDIT: Uploaded a Bink - Bk2 converter i injected it myself and also i wrote that cmd file as well ..hope you like it !!
EDIT 2 : Thanks for lzmh will test it :D if its promising i will also update my tools here :)
EDIT 3 : it seems i cant make lzmh work right now (windows 10 machine) but trying the new injected lzham on 7z :P thanks again gozarck

kenzo34 18-12-2015 00:37

hello panker 1992. I allowed myself to change the compression order in: precomp+msc+srep64+zstd+xz
on 1 file 150mo result is: 60mo
with your method: precomp+msc+srep64+xz result is 44mo
do you know why with xz and zstd together compression is less good?
I was thinking the 2 associate give best results.
Thank you

panker1992 19-12-2015 08:03

the reason is simple ..... different algorithms give different results
for example srep, lzham, lzma and xz(lzma2) all use the same variant of lz77 original algorithm on the other hand zstd has lzo variant algorith with fixed dictionary and entropy encoder all on it ... so it trades its ratio for a maximum of 500 mb per thread per sec


now to get to the point srep + xz = lz77 + lz77 so it gives its best ratio on the file
srep + zstd + xz = lz77 + lzo + lz77 so the xz cant perform its best on top of an lzo algorithm

i hope i got clear on this, please ask any questions that you like
if i can answer it will do for sure :)

kenzo34 19-12-2015 08:40

thank you Panker1992 for your reactivity
I understand now the difference of ratio.

panker1992 19-12-2015 09:01

Ratio-mania and compression-mania started because i wasnt able to fit many many data on dvds

Now after several years i have tried to learn everything i can on how compression algorithms work

Your welcome kenzo hope you reach your goal on compression :)


All times are GMT -7. The time now is 10:09.

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