7Zip Plugin Continued ...

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
elgonzo
Senior Member
Senior Member
Posts: 377
Joined: 2013-09-04, 14:07 UTC

Post by *elgonzo » 2018-01-31, 12:04 UTC

iana wrote:TC can merge *.001 files too just select the first ie 001 file and select Files->Combine Files... you don't need 7zip for that
Why would you need to merge the parts of an 7z archive again? The 7-zip archiver as well as the 7z support built into TC itself can handle 7z split-archives just fine. It would be quite bad if the 7zip plug-in prevents TC from unpacking split 7z archives...
Windows 7 Pro x64 SP1

iana
Senior Member
Senior Member
Posts: 342
Joined: 2010-07-27, 22:00 UTC

Post by *iana » 2018-01-31, 15:22 UTC

elgonzo wrote:
iana wrote:TC can merge *.001 files too just select the first ie 001 file and select Files->Combine Files... you don't need 7zip for that
Why would you need to merge the parts of an 7z archive again? The 7-zip archiver as well as the 7z support built into TC itself can handle 7z split-archives just fine. It would be quite bad if the 7zip plug-in prevents TC from unpacking split 7z archives...
there is no such thing as split 7z archives Igor just implemented an already existing split feature you don't need to use it on 7z files it can split and merge what ever and it came with TC years before 7z existed

ps you need all split files to be in the same folder before you can decompress a "split 7z" that's not true for split rars or zips (even the dead ace had a true split feature)

User avatar
elgonzo
Senior Member
Senior Member
Posts: 377
Joined: 2013-09-04, 14:07 UTC

Post by *elgonzo » 2018-01-31, 15:55 UTC

iana wrote:there is no such thing as split 7z archives Igor just implemented an already existing split feature you don't need to use it on 7z files it can split and merge what ever and it came with TC years before 7z existed
I was specifically referring to your suggestion that you can merge "non-existing" 7z split archives with Files->Combine Files..., which could be read like that is the way how "non-existing" 7z split files should usually be handled with TC.

Of course 7-zip (i mean 7-zip tool from I. Pavlov and similar other archiving tools supporting 7z; i am not referring to the plug-in) as well as TC do support "non-existing" split 7z archives automatically without you needing to merge the parts first. So, yes, there is no point for manually merging (i.e., Files->Combine Files...) the parts of those "non-existing" 7z split files.

If the plug-in is unable and prevents TC from handling those "non-existing" 7z split archives, then this is major flaw. Sure, manually merging the split 7z archive could work-around this. But then again, why would you want to use such a plug-in in this case instead of using TC without this plug-in (or with another tool/plug-in) that can handle "non-existing" split 7z archives properly without any hassle?
iana wrote:there is no such thing as split 7z archives
Yeah, sure, whatever you say. It seems you know more about 7z than Igor Pavlov. :twisted: /dismissive_irony
And whatever you are smoking, perhaps don't... ;) ...especially when considering what you yourself said in your previous post:
iana wrote:
Markar1 wrote:2dllee
Can 7zip plugin create multiple volume archives, if it can then how?
yes but it doesn't need to as 7zip does not have multivolume support it uses binary split which TC supports natively [...]
(Note that it seems you were then and there even aware of the distinction between split 7z archives and multi-volume archives; correctly pointing out that 7z is not having multi-volume capabilities)
Windows 7 Pro x64 SP1

Markar1
Junior Member
Junior Member
Posts: 3
Joined: 2018-01-31, 07:06 UTC

Post by *Markar1 » 2018-02-01, 09:07 UTC

But curiously enough Total7Zip Plugin has the option for making multiple archives but it is not work. I hoped 7Zip does...
Now I use native WinRar and 7Zip archivers for this purpose.

iana
Senior Member
Senior Member
Posts: 342
Joined: 2010-07-27, 22:00 UTC

Post by *iana » 2018-02-04, 07:12 UTC

elgonzo wrote:
iana wrote:there is no such thing as split 7z archives Igor just implemented an already existing split feature you don't need to use it on 7z files it can split and merge what ever and it came with TC years before 7z existed
I was specifically referring to your suggestion that you can merge "non-existing" 7z split archives with Files->Combine Files..., which could be read like that is the way how "non-existing" 7z split files should usually be handled with TC.

Of course 7-zip (i mean 7-zip tool from I. Pavlov and similar other archiving tools supporting 7z; i am not referring to the plug-in) as well as TC do support "non-existing" split 7z archives automatically without you needing to merge the parts first. So, yes, there is no point for manually merging (i.e., Files->Combine Files...) the parts of those "non-existing" 7z split files.

If the plug-in is unable and prevents TC from handling those "non-existing" 7z split archives, then this is major flaw. Sure, manually merging the split 7z archive could work-around this. But then again, why would you want to use such a plug-in in this case instead of using TC without this plug-in (or with another tool/plug-in) that can handle "non-existing" split 7z archives properly without any hassle?
iana wrote:there is no such thing as split 7z archives
Yeah, sure, whatever you say. It seems you know more about 7z than Igor Pavlov. :twisted: /dismissive_irony
And whatever you are smoking, perhaps don't... ;) ...especially when considering what you yourself said in your previous post:
iana wrote:
Markar1 wrote:2dllee
Can 7zip plugin create multiple volume archives, if it can then how?
yes but it doesn't need to as 7zip does not have multivolume support it uses binary split which TC supports natively [...]
(Note that it seems you were then and there even aware of the distinction between split 7z archives and multi-volume archives; correctly pointing out that 7z is not having multi-volume capabilities)
001 has existed for years people asked Igor for a multivolume support and all he did is implement an existing feature a binary split which is natively supported by TC
https://fileinfo.com/extension/001
https://en.wikipedia.org/wiki/Split_(Unix)
http://man7.org/linux/man-pages/man1/split.1.html

User avatar
elgonzo
Senior Member
Senior Member
Posts: 377
Joined: 2013-09-04, 14:07 UTC

Post by *elgonzo » 2018-02-04, 09:53 UTC

iana wrote:001 has existed for years people asked Igor for a multivolume support and all he did is implement an existing feature a binary split which is natively supported by TC
https://fileinfo.com/extension/001
https://en.wikipedia.org/wiki/Split_(Unix)
http://man7.org/linux/man-pages/man1/split.1.html
I never even argued about what you say here. Go back and look at my posts again. :roll:
Windows 7 Pro x64 SP1

DaveCmd
Junior Member
Junior Member
Posts: 3
Joined: 2017-07-18, 15:36 UTC

Post by *DaveCmd » 2018-04-20, 15:27 UTC

Hi,
Quick question about the development of the 7Zip plug-in. I installed the latest 7Zip version (0.7.6.6) on 64-bit Total Commander and set it up to chew away at a 1GB job.
I noticed it was running very slowly, so I checked my Resource Monitor in Win 10 and I noticed it was only using 1 CPU.

Is it possible to get 7zip to use more of the available CPUs? If so, any plans do implement this in future builds?

Thanks,
Dave

keithwalmar
New Member
New Member
Posts: 1
Joined: 2019-04-08, 05:54 UTC

Re: 7Zip Plugin Continued ...

Post by *keithwalmar » 2019-04-08, 05:56 UTC

Generally speaking most modern compression algorithms give roughly the same compression, and with regard to the number of cores that you can use at once, it is up to you to decide how many you want to use. However, 7-zip is free and open source. The 7z format supports encryption with the AES algorithm with a 256-bit key. If the zip file exceeds that size, 7-zip (edited) will split it into multiple files automatically, such as integration_serviceLog.zip.001, integration_serviceLog.zip.002, etc. (Way back when, PK Zip used this to span zip files across multiple floppy disks.) You'll need all the files to be present to unzip them. The 7z format provides the option to encrypt the filenames of a 7z archive.


I was clever enough to hide spam behind a friendly looking link, but now I am a banned user :roll:

 

WeekendCoder
Junior Member
Junior Member
Posts: 2
Joined: 2019-09-08, 13:40 UTC

Re: 7Zip Plugin Continued ...

Post by *WeekendCoder » 2019-09-08, 13:42 UTC

I think there's a serious bug in the plugin: ReadHeader/ReadHeaderEx do not advance the item index on success (handle->iItem), so info on the same first entry is always returned and the host enters an endless loop of calling ReadHeader and getting 0.

This behavior is contrary to what the Packer Plugin Interface.chm mandates:
Totalcmd calls ReadHeader to find out what files are in the archive.

int __stdcall ReadHeader (HANDLE hArcData, tHeaderData *HeaderData);

Description

ReadHeader is called as long as it returns zero (as long as the previous call to this function returned zero). Each time it is called, HeaderData is supposed to provide Totalcmd with information about the next file contained in the archive. When all files in the archive have been returned, ReadHeader should return E_END_ARCHIVE which will prevent ReaderHeader from being called again. If an error occurs, ReadHeader should return one of the error values or 0 for no error.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38395
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: 7Zip Plugin Continued ...

Post by *ghisler(Author) » 2019-09-09, 13:12 UTC

You need to call the functions ReadHeader and ProcessFile as a pair, with operation set to PK_SKIP for files you don't want to unpack.

So when listing a file, call OpenArchive with OpenMode set to PK_OM_LIST, then ReadHeader and ProcessFile in a loop, and finally CloseArchive.

My guess is that the 7zip plugin only goes to the next file when calling ProcessFile.
Author of Total Commander
http://www.ghisler.com

WeekendCoder
Junior Member
Junior Member
Posts: 2
Joined: 2019-09-08, 13:40 UTC

Re: 7Zip Plugin Continued ...

Post by *WeekendCoder » 2019-09-10, 13:35 UTC

Oh, I see, of course you're right. Thank you very much for clarifying this bit. I've seen that ProcessFile increments the index properly, but I didn't realize PK_SKIP can be used for this purpose.
Perhaps, it could / should be reflected in the plugin programming reference as well?

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38395
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: 7Zip Plugin Continued ...

Post by *ghisler(Author) » 2019-09-12, 10:09 UTC

It is actually documented under "Overview":

Code: Select all

Here is a simple pseudocode declaration how Total Commander calls the extraction functions:
1. Loop to scan for files in the archive:
OpenArchive()          with OpenMode==PK_OM_LIST
repeat
   ReadHeader()
   ProcessFile(...,PK_SKIP,...)
until error returned
CloseArchive()
Author of Total Commander
http://www.ghisler.com

Post Reply