This is not the only reason why you should not pass a backslash at the end of the name. If you create an archive in TC and then open it in 7Zip, you will see an additional folder named "_" inside each folder. This happens because 7z.dll does not expect the names in the archive to be stored with a backslash, and processing such names generates an additional folder.
7zip native support
Moderators: Hacker, petermad, Stefan2, white
Re: 7zip native support
Re: 7zip native support
2ghisler(Author)
-mm= is for Zip, Gzip, Tar and methods only.
7za.exe a -mm=posix file.tar folder
1. Christian, 7-zip's syntax is more complex than "Help" tells us and I can explain, I'll try to just show you.
For example this command is exactly right and many users are used to this syntax and prefer to define the parameters like this:
7za.exe a -md=512m -mfb=273 -mmt=4 -myx=9 -mx=9
but these are the same command and they are also right:
7za.exe a -md512m -mfb273 -mmt4 -myx9 -mx9
and even shorter:
7za.exe a -md512m -mfb273 -mmt4 -myx -mx
and some more:
7za.exe a -m0=LZMA2:d29:fb273:mt4:x9 -myx (d29 = d512m) 29 means 2^29 in bytes, because it has no [b|k|m|g] after it.
2. And Dec is Denis, http://facebook.github.io/zstd/ "Denis Anisimov, of TC4shell fame, also developed a 7-zip plugin with Zstandard support."
I can just add, many plugins, https://www.tc4shell.com/en/7zip/ they're not OSS but free.
-mm= is for Zip, Gzip, Tar and methods only.
7za.exe a -mm=posix file.tar folder
1. Christian, 7-zip's syntax is more complex than "Help" tells us and I can explain, I'll try to just show you.
For example this command is exactly right and many users are used to this syntax and prefer to define the parameters like this:
7za.exe a -md=512m -mfb=273 -mmt=4 -myx=9 -mx=9
but these are the same command and they are also right:
7za.exe a -md512m -mfb273 -mmt4 -myx9 -mx9
and even shorter:
7za.exe a -md512m -mfb273 -mmt4 -myx -mx
and some more:
7za.exe a -m0=LZMA2:d29:fb273:mt4:x9 -myx (d29 = d512m) 29 means 2^29 in bytes, because it has no [b|k|m|g] after it.
2. And Dec is Denis, http://facebook.github.io/zstd/ "Denis Anisimov, of TC4shell fame, also developed a 7-zip plugin with Zstandard support."
I can just add, many plugins, https://www.tc4shell.com/en/7zip/ they're not OSS but free.
Last edited by lelik007 on 2024-11-11, 15:05 UTC, edited 3 times in total.
Re: 7zip native support
2AntonyD
What "reverse engineering" are you talking about? 7-zip is FOSS but besides Igor the code is unfamiliar for everyone and poor documented that's why there are so many difficulties.
Well, perhaps, somebody contacts Igor and speaking his native language offers his the money, but what exactly for?
Igor won't provide any additional documentation, because if he wanted it for every developer out there it'd be here right now. He simply doesn't need it being this documentation himself.
And If he made the internal packer for TC himself than Christian still wouldn't understand anything what is going on in this TC's module.
To ask Igor for a custom wrapper or an API, well, IDK.
What "reverse engineering" are you talking about? 7-zip is FOSS but besides Igor the code is unfamiliar for everyone and poor documented that's why there are so many difficulties.
Well, perhaps, somebody contacts Igor and speaking his native language offers his the money, but what exactly for?
Igor won't provide any additional documentation, because if he wanted it for every developer out there it'd be here right now. He simply doesn't need it being this documentation himself.
And If he made the internal packer for TC himself than Christian still wouldn't understand anything what is going on in this TC's module.
To ask Igor for a custom wrapper or an API, well, IDK.
Re: 7zip native support
Well, what else can you call what the author is now forced to do?
He practically wonders - what if there is such a parameter, and what if there is such a key... take this suffix, use this prefix ....
Therefore, at least here is a way out of the situation like “To ask Igor for a custom wrapper or an API, well, IDK.” - and if also for a fee -
it seems to me that the matter would get off the ground much faster than it is moving now...
He practically wonders - what if there is such a parameter, and what if there is such a key... take this suffix, use this prefix ....
Therefore, at least here is a way out of the situation like “To ask Igor for a custom wrapper or an API, well, IDK.” - and if also for a fee -
it seems to me that the matter would get off the ground much faster than it is moving now...
#146217 personal license
Re: 7zip native support
2AntonyD
It's already moving on with Denis' help.
"He practically wonders - what if there is such a parameter, and what if there is such a key..."
Yes, because either 7z.dll or bit7z is new to him and it takes some time and help to understand what is what.
Igor or Denis can't give Christian most valuable thing they have - their experience for money of not.
As for Igor, he won't leave everything and make something for money, even if he'll agree it might be even longer process.
Though, I actually sent him a message in Russian on SF and asked his opinion about this situation and any possible offer.
But TBH I don't believe it's real what you suggest.
It's already moving on with Denis' help.
"He practically wonders - what if there is such a parameter, and what if there is such a key..."
Yes, because either 7z.dll or bit7z is new to him and it takes some time and help to understand what is what.
Igor or Denis can't give Christian most valuable thing they have - their experience for money of not.
As for Igor, he won't leave everything and make something for money, even if he'll agree it might be even longer process.
Though, I actually sent him a message in Russian on SF and asked his opinion about this situation and any possible offer.
But TBH I don't believe it's real what you suggest.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: 7zip native support
2lelik007
That would be very difficult to support - for now I will only support those with "=" and without any parameters in the internal packer.but these are the same command and they are also right:
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: 7zip native support
2ghisler(Author)
It's not a problem, this is a classic full 7-zip's syntax, this just should be in TC's help with some valid copy/paste commands for example.
Because if a user will switch to the external packer 7zG.exe will take a command like this.
As for 7-zip -mm=LZMA, it's not a mistake, I simply don't remember what second "m" means here instead of a digit, m0= , as I understand.
And it's also possible to do this: 7za.exe a file.zip file -m20=deflate64 and even Windows 10 build-in packer can decompresses file.zip.
But Igor said It can do no good for the older versions.
And as for AntonyD's suggestion, Igor develops 7-zip and and provides it as is. He doesn't implement 7-zip in whatever SW himself.
It's not a problem, this is a classic full 7-zip's syntax, this just should be in TC's help with some valid copy/paste commands for example.
Because if a user will switch to the external packer 7zG.exe will take a command like this.
As for 7-zip -mm=LZMA, it's not a mistake, I simply don't remember what second "m" means here instead of a digit, m0= , as I understand.
And it's also possible to do this: 7za.exe a file.zip file -m20=deflate64 and even Windows 10 build-in packer can decompresses file.zip.
But Igor said It can do no good for the older versions.
And as for AntonyD's suggestion, Igor develops 7-zip and and provides it as is. He doesn't implement 7-zip in whatever SW himself.
Last edited by lelik007 on 2024-11-12, 05:52 UTC, edited 2 times in total.
Re: 7zip native support
2ghisler(Author)
Igor said that despite what I mentioned previously this should be preferred:
-mm= for Zip, Gzip, Tar
-m0 - N= for 7z
but of course it shouldn't be this way: -mmmt=4 -or -mmd=512m, 7z.exe/7zG.exe can't handle it, it should be -mmt=4 -md=512m with single m at the beginning.
2AntonyD
Igor replied, if you've got any issues, please do come right here:
https://sourceforge.net/p/sevenzip/support-requests/
And I'll take a look what to do
And this is it.
Igor said that despite what I mentioned previously this should be preferred:
-mm= for Zip, Gzip, Tar
-m0 - N= for 7z
but of course it shouldn't be this way: -mmmt=4 -or -mmd=512m, 7z.exe/7zG.exe can't handle it, it should be -mmt=4 -md=512m with single m at the beginning.
2AntonyD
Igor replied, if you've got any issues, please do come right here:
https://sourceforge.net/p/sevenzip/support-requests/
And I'll take a look what to do

- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: 7zip native support
I will handle -mx9 in addition to -mx=9 when the parameter is numeric because it's easy to parse. However, I don't know how to handle just -mx, what should I pass to the 7zip dll for a parameter with empty value? I tried to set it to NULL or an empty string, but got "invalid parameter" back.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: 7zip native support
Value should have type VT_EMPTY. But what do you expect from the 7z.dll when you pass an empty value? What should 7z.dll do?ghisler(Author) wrote: 2024-11-12, 09:01 UTCI don't know how to handle just -mx, what should I pass to the 7zip dll for a parameter with empty value?
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: 7zip native support
Great, that actually worked!Value should have type VT_EMPTY.
When I pass flag -mx to it (name="x", value=VT_EMPTY) it should use the default value for -mx, which would be -mx=9. And that's exactly what happens!But what do you expect from the 7z.dll when you pass an empty value? What should 7z.dll do?
I also tried -mqs by passing name="qs", value=VT_EMPTY and it also worked like -mqs=on.
That means that I don't need to hard code all the default values, just pass VT_EMPTY to the dll.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: 7zip native support
7z.dll will use the default value even if you don't pass an empty parameter. This is an unnecessary operation.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: 7zip native support
No, that's not the same default! For example, parameter -mx to set the compression:
https://documentation.help/7-Zip-18.0/method.htm#7Z
According to the 7-Zip help, the default compression level is 5.
But when you add parameter -mx the compression level will be set to 9:
https://documentation.help/7-Zip-18.0/method.htm#SevenZipX
But when I pass flag -mx to it (name="x", value=VT_EMPTY) the 7-Zip dll uses 9.
https://documentation.help/7-Zip-18.0/method.htm#7Z
According to the 7-Zip help, the default compression level is 5.
But when you add parameter -mx the compression level will be set to 9:
https://documentation.help/7-Zip-18.0/method.htm#SevenZipX
So when I don't set the compression level, the 7-Zip dll uses 5.Note: "x" works as "x=9".
But when I pass flag -mx to it (name="x", value=VT_EMPTY) the 7-Zip dll uses 9.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: 7zip native support
2ghisler(Author)
Christian, take a look at the image. Dec means that 7zG doesn't pass the default values as we see them, only what is necessary.
[img]https://www.upload.ee/thumb/17380936/7zTC.jpg[/img]
What he previously said for these settings, Dec please, correct me If I'm wrong.
---
7-Zip passes here:
x=9
he=off (here IDK, it's a default value, does Igor double check himself)?
mt=2 - because as we see, it's not a default value (without *), *=4
---
TC passes here:
x=9
s=true (it's a default value, and I think only s=false should be passed if a corresponding option is unchecked)
mt=2
0=LZMA2 (it's a default value)
s=2048m (because we see it like this, but a default value for compression level 9 in 7-zip is 16gb)
Here IDK, Dec knows but if a corresponding option is checked it should be either s=true or s=2048m but not both of them at the same
time or maybe there's should be nothing for the defaults of level 9 - 16g.
if I wanted to explicitly write what is shown in TC it'd be -ms=2048m or -ms=16g in 7-zip and this is it - you've already defined it solid with 2048m limit of a block. We don't write in 7z.exe -ms=on, we write -ms=off (-ms-) to disable a solid compression if we so choose.
The idea behind it: 7zG/7z.exe are just the same application that uses 7z.dll, what did I choose: -mx=9 and -mmt=2 and that's all what is passed.
It passes only what is changed it meant.
Christian, take a look at the image. Dec means that 7zG doesn't pass the default values as we see them, only what is necessary.
[img]https://www.upload.ee/thumb/17380936/7zTC.jpg[/img]
What he previously said for these settings, Dec please, correct me If I'm wrong.
---
7-Zip passes here:
x=9
he=off (here IDK, it's a default value, does Igor double check himself)?
mt=2 - because as we see, it's not a default value (without *), *=4
---
TC passes here:
x=9
s=true (it's a default value, and I think only s=false should be passed if a corresponding option is unchecked)
mt=2
0=LZMA2 (it's a default value)
s=2048m (because we see it like this, but a default value for compression level 9 in 7-zip is 16gb)
Here IDK, Dec knows but if a corresponding option is checked it should be either s=true or s=2048m but not both of them at the same
time or maybe there's should be nothing for the defaults of level 9 - 16g.
if I wanted to explicitly write what is shown in TC it'd be -ms=2048m or -ms=16g in 7-zip and this is it - you've already defined it solid with 2048m limit of a block. We don't write in 7z.exe -ms=on, we write -ms=off (-ms-) to disable a solid compression if we so choose.
The idea behind it: 7zG/7z.exe are just the same application that uses 7z.dll, what did I choose: -mx=9 and -mmt=2 and that's all what is passed.
It passes only what is changed it meant.