Page 3 of 13

Re: 7zip native support

Posted: 2024-11-05, 15:00 UTC
by Usher
2MaxX
Not all -mx numbers are described in 7zip help. Other compression levels also work and give different results than described in help.
7zip by default uses -myx=5 for level of file analysis.
7zip by default doesn't use -mqs for sorting by file extension.

Re: 7zip native support

Posted: 2024-11-05, 16:13 UTC
by lelik007
2petermad
I got an idea from what you'd found out previously, so I put -mmf=off in Extra Parameters (it should be with additional m to work) for the internal packer, then I switched to external packer with -mf=off, so I repacked Firefox and Thunderbird and had very close sizes for the archives, though archives are not identical.

Re: 7zip native support

Posted: 2024-11-05, 18:18 UTC
by ghisler(Author)
2petermad
I have tested this now and can confirm it with your settings. However, if I manually set the dictionary size and word size to some values, e.g. dictionary size to 64M and word size to 64, I get the same sizes.
So apparently 7zg.exe uses different default values for dictionary size and word size than 7z.dll when I don't tell any of the two which they should use!

Re: 7zip native support

Posted: 2024-11-05, 23:32 UTC
by petermad
However, if I manually set the dictionary size and word size to some values, e.g. dictionary size to 64M and word size to 64, I get the same sizes.
Not confirmed. With LZMA2 (non-solid) I get the same different sizes for internal and external packing no matter whether I set 64m and 64 or default for those parameters. Tested with original Tc7z64.dll and with Tc7z64.dll replaced with 7z.dll - Please test again.

Re: 7zip native support

Posted: 2024-11-06, 07:42 UTC
by ghisler(Author)
I didn't even need to replace tc7z64.dll with 7z.dll in my tests! I'm using tc7z64.dll which comes with the beta version and the latest 7zg.exe coming from www.7-zip.org.

Re: 7zip native support

Posted: 2024-11-06, 11:17 UTC
by petermad
But did you test again - I get the same results with different archives with internal and external packing no matter whether I set 64M and 64 or default for those parameters

Re: 7zip native support

Posted: 2024-11-06, 13:29 UTC
by ghisler(Author)
I tried with a lot more dlls and indeed got a different result. Maybe the external 7-zip packs the files in a different order? This also has an influence when using solid archives.

Re: 7zip native support

Posted: 2024-11-06, 15:22 UTC
by lelik007
2ghisler(Author)
For solid archives 7-zip sorts the files, Help - Switches - Method - qs. And, yes, -mqs can affect the final size but not in the degree if I got 0,9 Mb difference for my private archive where only .txts, .docs, .pdfs in some folders. I redefined 7-zip's ultra level (-mx or -mx9) in Extra Parameters for the internal packer explicitly like this:

Code: Select all

-mm0=lzma2 -mmfb=273 -mmd=512m -mmmt=4 -mms=16g -mmyx=7 -mmx=9
And still had the difference of 0,9 Mb, though I don't understand what's additional "m" for and what's its purpose for the internal packer.

Re: 7zip native support

Posted: 2024-11-06, 17:00 UTC
by MaxX
2lelik007
-mmmt=
greater than 2 or 3 is bad idea for LZMA and LZMA2.
This causes worse compression and has much greater RAM needs.

Re: 7zip native support

Posted: 2024-11-06, 17:48 UTC
by petermad
Maybe the external 7-zip packs the files in a different order?
I noticed that both the internal and the external packer does not pack the files in the order on the disk (or TC's curent sort order) - they pack the .dll and .exe file after the other files, which are packed in disk order (NTFS order - as seen when setting TC to Unsorted view).

Also if I put the files on a FAT32 partition in this random order (Use Unsorted order to see that)
Readme.txt
Imagine64.exe
Whatsnew.txt
Imagine64.dll
Imagine.chm
Imagine.wlx64
Imagine.wcx64

They are packed in this order ( see: https://tcmd.madsenworld.dk/7zpackorder.png ):
Imagine.chm
Imagine.wcx64
Imagine.wlx64
Readme.txt
Whatsnew.txt
Imagine64.dll
Imagine64.exe

Which except for the .dll and the .exe file is the same order as the files are stored on and NFTS partition.
But still, the order is the same in the archive packed internally and externally, but the internally packed file is 10159 bytes bigger

Re: 7zip native support

Posted: 2024-11-06, 18:12 UTC
by MaxX
petermad wrote: 2024-11-06, 17:48 UTCthey pack the .dll and .exe file after the other files
Not just "after", but in separate block with BCJ+LZMA.
You can't create one block with different filters in one. Only separate blocks for each used filter.

Re: 7zip native support

Posted: 2024-11-06, 18:29 UTC
by lelik007
2MaxX
4 threads are for the testing purposes only.

And, well, what I think unless we have somebody who understands 7-zip format itself and can see where exactly in it this additional information is stored we'll not be able to find out what causes this issue.

Re: 7zip native support

Posted: 2024-11-06, 18:48 UTC
by MaxX
2lelik007
I have been using 7zip for years. May be I could check later what is the difference in TC's and 7z's archives. Just need to get some free time for that.

Re: 7zip native support

Posted: 2024-11-06, 19:12 UTC
by lelik007
2MaxX
Thank you in advance, IDK a switch of 7-zip that I haven't tried yet and which can affect archives like this, so I give up.

Re: 7zip native support

Posted: 2024-11-06, 20:23 UTC
by petermad
Not just "after", but in separate block with BCJ+LZMA.
You can't create one block with different filters in one. Only separate blocks for each used filter.
Can you explain that? What is BJC - and what are those filters you mention?

Note - I am not using the Solid archive option in the tests.