Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multi volume 7z files #980

Merged
merged 10 commits into from
Jul 6, 2023

Conversation

ShayArtzi
Copy link
Contributor

@ShayArtzi ShayArtzi commented Jun 10, 2023

Hi folks,

I would like to finish the multi-volume archive support I have started in PR #881. This PR is for adding support for multi volume 7z archives.

Multi volume 7z archives have a special file extension - 7z.DDD where DDD is a 3-digit number, starting with 001:
image

Internally, multi-part 7z files are just a 7z file split into multiple files. It means that:

  1. Only the first file starts with a magic number (signature).
  2. There is no way to know ahead of time what is the total number of files.

This is different from the way multi volume rar files are implemented, and that's the reason why I have created a dedicated handler for multi volume 7z files (and didn't re-use the multi volume rar handler).

Please let me know what you think... Thanks!

@ShayArtzi ShayArtzi marked this pull request as ready for review June 10, 2023 21:06
@ShayArtzi ShayArtzi requested a review from ahadas as a code owner June 10, 2023 21:06
@ahadas ahadas self-assigned this Jun 26, 2023
@ahadas ahadas force-pushed the multi_volume_7z branch from 4027288 to 8ede1c6 Compare July 1, 2023 12:31

@Override
public String cryptoGetTextPassword() throws SevenZipException {
if (password == null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about empty password? how is it being treated - just being curious....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting question... I don't think it is technically possible to encrypt with an empty password because essentially you don't have a key to perform the encryption operation in the first place...

Copy link
Member

@ahadas ahadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the follow-up @ShayArtzi!

@ahadas ahadas merged commit 49afd33 into mucommander:master Jul 6, 2023
@ahadas
Copy link
Member

ahadas commented Jul 6, 2023

thanks @ShayArtzi !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants