7zip native support
Moderators: Hacker, petermad, Stefan2, white
Re: 7zip native support
I didn't find more appropriate topic to ask: why doesn't the internal 7-zip packer produce just the same archives that 7-zip/external does?
I don't know it's a bug or it's supposed to be like this, but everybody can reproduce it, for example:
Download Firefox, which by itself 7z SFX archive, unpack it.
https://ftp.mozilla.org/pub/firefox/releases/128.4.0esr/win64/en-US/Firefox%20Setup%20128.4.0esr.exe
then with the default TC setting for the internal packer - pack it (Archive1), then choose where your 7z.exe/7zG.exe is and switch to external packer and pack again to (Archive2) and these archives are similar but not identical, they are even not of the same size.
Why? Yes, 7-zip shows just the same very methods, dictionaries, filters but it can't show the very important parameters like -mfb= mmt= (that were used) mqs= the format itself doesn't store them, maybe they're different, IDK.
I couldn't find a way to reproduce the identical archives that internal 7-zip does with any settings of 7-zip/external packer, the external packer does the same exact archives as 7-zip with the same settings, they're identical by hash, but the internal is tuned differently so the archives are not identical.
I don't know it's a bug or it's supposed to be like this, but everybody can reproduce it, for example:
Download Firefox, which by itself 7z SFX archive, unpack it.
https://ftp.mozilla.org/pub/firefox/releases/128.4.0esr/win64/en-US/Firefox%20Setup%20128.4.0esr.exe
then with the default TC setting for the internal packer - pack it (Archive1), then choose where your 7z.exe/7zG.exe is and switch to external packer and pack again to (Archive2) and these archives are similar but not identical, they are even not of the same size.
Why? Yes, 7-zip shows just the same very methods, dictionaries, filters but it can't show the very important parameters like -mfb= mmt= (that were used) mqs= the format itself doesn't store them, maybe they're different, IDK.
I couldn't find a way to reproduce the identical archives that internal 7-zip does with any settings of 7-zip/external packer, the external packer does the same exact archives as 7-zip with the same settings, they're identical by hash, but the internal is tuned differently so the archives are not identical.
Re: 7zip native support
2lelik007
You're no alone. I have also noticed that output 7z files are always different.
You're no alone. I have also noticed that output 7z files are always different.
Ukrainian Total Commander Translator. Feedback and discuss.
Re: 7zip native support
Confirmed - using the Internal 7-Zip packer seems to make slightly bigger archives. than using 7zG.exe from TC, Total7zip plugin or 7zFM.exe
7zG.exe from TC, Total7zip plugin or 7zFM.exe makes identical archives, when the settings are the same.
7zG.exe from TC, Total7zip plugin or 7zFM.exe makes identical archives, when the settings are the same.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: 7zip native support
Try using the exact same 7z.dll you use with 7zg.exe also in Total Commander. You need to rename it to tc7z.dll / tc7z64.dll and put it in the total Commander directory.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: 7zip native support
Did that - Internal 7-zip packing still makes slightly larger archives.Try using the exact same 7z.dll you use with 7zg.exe also in Total Commander.
This applies to all test I made, except for a test where I unpack tc1150x64_b4.exe to an empty dir, mark all the items and pack to another dir - then I get Identical 7z archives. But if I go out of the dir with the files from tc1150x64_b4.exe and just mark that dir for packing , then I do not get identical 7z files when packing with and without the Internal 7-Zip Packer
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: 7zip native support
Perhaps TC stores folder names separately while 7-Zip does not? (I'm just wondering, I have no clue)petermad wrote: 2024-11-04, 11:54 UTC Did that - Internal 7-zip packing still makes slightly larger archives
Re: 7zip native support
Well that seems likely. If I pack a directory without subfolders, I get Identical archives, but not if there are subfolders in the dir - Hence I get identical archives when I pack the content of tc1150x64_b4.exe which does not have any subfolders.Perhaps TC stores folder names separately while
The above also applies if I use the original Tc7z64.dll
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: 7zip native support
I couldn't produce the identical archives with the official 7z.dll from just a batch of files without any folders and have no idea why this happens because 7zFM.exe shows no difference whatsoever.
Re: 7zip native support
I tested a little more and it is not always either that I get identical archives just because there are no subfolders in the archive.7zFM.exe shows no difference whatsoever.
If I tests with for example the files from the latest Imagine 64bit plugin https://www.nyam.pe.kr/dev/imagine/download.php?arch=x64&unicode=1&full=1&setup=0&version=1.7.0 :
Imagine.chm
Imagine.wcx64
Imagine.wlx64
Imagine64.dll
Imagine64.exe
Readme.txt
Whatsnew.txt
Then if I pack all the files execpt the .dll and the .exe file i get identical 7z archives with Internal and external 7-Zip packer.
But if I include either the .dll or the .exe file, or both I get archives that are NOT identical.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: 7zip native support
2petermad
Yes, you are right the archives are identical if:
1. There are no folders inside.
2. Only text files, I used 9 .doc files.
But then I packed 2 mp4 videos with no folders and the archives again are NOT identical.
Yes, you are right the archives are identical if:
1. There are no folders inside.
2. Only text files, I used 9 .doc files.
But then I packed 2 mp4 videos with no folders and the archives again are NOT identical.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: 7zip native support
1. Yes, I tell the packer to pack folders, but external 7-zip also packs folders - you can see that by checking the folder dates in a path, they are stored too when packing from TC with external 7zg.exe. So there must be something else.
2. I get the exact same size when packing 2 mp4 files using the included tc7z64.dll and the latest 7zg.exe version 24.8.0.0.
What compression parameters did you use? I use compressiom ratio 6, LZMA2, 4 threads, otherwise all set to default.
2. I get the exact same size when packing 2 mp4 files using the included tc7z64.dll and the latest 7zg.exe version 24.8.0.0.
What compression parameters did you use? I use compressiom ratio 6, LZMA2, 4 threads, otherwise all set to default.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: 7zip native support
2ghisler(Author)
[img]https://www.upload.ee/thumb/17350725/7zdiff2.jpg[/img]
For me TBH the external packer is a way to go, the internal one is limited: certain parameters will work and some won't, for example, I don't think that
-slp will work with the internal packer, but I always use this switch.
[img]https://www.upload.ee/thumb/17350725/7zdiff2.jpg[/img]
For me TBH the external packer is a way to go, the internal one is limited: certain parameters will work and some won't, for example, I don't think that
-slp will work with the internal packer, but I always use this switch.
Re: 7zip native support
7-zip uses compression levels from 0 (store with no compression) to 9. Level 5 is default.ghisler(Author) wrote: 2024-11-05, 08:23 UTCI use compressiom ratio 6, LZMA2, 4 threads, otherwise all set to default.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: 7zip native support
AFAIK, 7zip has these numbers for compression naming: 0, 1, 3, 5, 7, 9. No 6 is there.
But I don't think it could matter at all because 7z should take proper neighbor number in such situation.
My personal need is ONLY the best compression (9) with best word size and unlimited single solid block for each filter:
-mx=9
-mmt=2
-myx=9
-mqs
-mfb=273
-slp
The only thing I change is the dict size:
-md=64M
or
-md=256M
or anything else for any special case.
So I do my tests this way.
I found that internal TC's compressor makes slightly different archives with these "the best" parameters.
It would be great if internal 7z packer could pack IDENTICAL archives (compared with original 7z binaries).
But I don't think it could matter at all because 7z should take proper neighbor number in such situation.
My personal need is ONLY the best compression (9) with best word size and unlimited single solid block for each filter:
-mx=9
-mmt=2
-myx=9
-mqs
-mfb=273
-slp
The only thing I change is the dict size:
-md=64M
or
-md=256M
or anything else for any special case.
So I do my tests this way.
I found that internal TC's compressor makes slightly different archives with these "the best" parameters.
It would be great if internal 7z packer could pack IDENTICAL archives (compared with original 7z binaries).
Ukrainian Total Commander Translator. Feedback and discuss.
Re: 7zip native support
2ghisler(Author)
So apparently it is not about whether the packed files are binary or not (the chm, wcx64 and wlx64 are binary)
I have also testet packing a series of archive files of different formats (rar, zip, ace etc) - and they pack identically with external and internal packer.
But apparently so far we know that .dll, .exe and some .mp4 files does not pack identically.
For us to test the same:What compression parameters did you use? I use compressiom ratio 6, LZMA2, 4 threads, otherwise all set to default.
- Download: https://www.nyam.pe.kr/dev/imagine/download.php?arch=x64&unicode=1&full=1&setup=0&version=1.7.0
- Extract these files to an empty dir:
Imagine.chm
Imagine.wcx64
Imagine.wlx64
Imagine64.dll
Imagine64.exe
Readme.txt
Whatsnew.txt - Use these settings in TC: https://tcmd.madsenworld.dk/7zsettings.png
- Pack all files with external and thereafter with internal 7-Zip packer
You get different 7z files
. - Now only pack these files with external and thereafter with internal 7-Zip packer
Imagine.chm
Imagine.wcx64
Imagine.wlx64
Readme.txt
Whatsnew.txt
You get identical 7z files
.
So apparently it is not about whether the packed files are binary or not (the chm, wcx64 and wlx64 are binary)
I have also testet packing a series of archive files of different formats (rar, zip, ace etc) - and they pack identically with external and internal packer.
But apparently so far we know that .dll, .exe and some .mp4 files does not pack identically.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar