Page 1 of 1

7z unpacking: Continue unpacking files from subsequent (solid) blocks following a corrupted block

Posted: 2021-03-19, 18:02 UTC
by gdpr deleted 6
Currently, when unpacking 7z archives with a/some corrupted block(s), TC entirely aborts unpacking if it encounters an error in a (solid) block and does not continue unpacking files from any subsequent blocks that might be present after the corrupted block. In this regard, TC's current 7z unpacker differs from the 7-zip utility. 7-zip will continue unpacking subsequent blocks when it encounters a corrupted block, thus being able to unpack more files successfully from a corrupted 7z archive than TC currently can (unless the corruption is located within the last block of the archive only, of course).

It would be nice if TC's 7z unpacking routines could continue with unpacking any subsequent blocks found in the unpacked 7z archive similar as the 7-zip utility does.


Side note
Whether an 7z archive contains multiple blocks depends on two factors:
(1) On the maximum block size specified when packing. If all compressed files don't fit in a single block of the specified size, multiple blocks will be created. (Afaik, a compressed data stream cannot cross block boundaries. Thus, a block will always be sized to hold at least a whole compressed data stream of at least one file, even if the size of that compressed data stream happens to be larger than the specified max block size.)
(2) Adding files to an existing archive. The existing archive will be expanded with new block(s) for the newly added files.

Re: 7z unpacking: Continue unpacking files from subsequent (solid) blocks following a corrupted block

Posted: 2021-03-19, 18:56 UTC
by Usher
2elgonzo
You can also use some switches for compression method to force creating multiple solid blocks. It's described in Help.