-
Notifications
You must be signed in to change notification settings - Fork 84
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
extraction multi file zip archive -> failes #20
Comments
Interesting. Every entry appears to have at least two properties, indicating the entry is split: IsSplitBeforeand IsSplitAfter (update to 1.0.12 to see these properties) simple entry.Extract(); is not working. My quick guess – to extract one entry one have to locate all parts first and merge all streams together in a single file. I didnt see any quick way of doing so in SevenZip interface. Maybe someone can help? |
List<string> files = new List<string>()
{
@"H:\SkyTest.part1.rar",
@"H:\SkyTest.part2.rar",
@"H:\SkyTest.part3.rar",
@"H:\SkyTest.part4.rar",
@"H:\SkyTest.part5.rar",
};
foreach (string file in files)
{
using (ArchiveFile archiveFile = new ArchiveFile(file))
{
Console.WriteLine(Path.GetFileName(file).ToUpper());
foreach (Entry entry in archiveFile.Entries)
{
Console.WriteLine(entry.FileName + " - " + entry.IsSplitBefore + " - " + entry.IsSplitAfter);
}
}
} |
Hey there, looks like https://github.com/squid-box/SevenZipSharp implements multi-part archive support by creating an appended stream of all files. See the I'll be attempting this approach with SevenZipExtractor using the Edit: I had no luck getting this working myself. Cheers |
Is SevenZipSharp itself is capable of extracting multipart archives? If yes then its worth to dive in. |
I'll test it out thoroughly tonight and let you know mate, thanks so so much for your amazing library. 😊 |
Okies, I've had some time to test this tonight with
With the following code, I can confirm that it does seem to handle the multipart archive: using SevenZip;
string path = @"C:\Users\Fots\Downloads\PowerShell-7.2.6-win-x64.part1.rar";
SevenZipBase.SetLibraryPath(@"C:\Users\Fots\scoop\apps\7zip\current\7z.dll");
using SevenZipExtractor extractor = new(path);
extractor.ExtractArchive(@"C:\testing"); And as you can see, the extracted file is identical to the original MSI:
Perhaps with your experience of the 7-Zip SDK, you would be able to understand how that library does it. I honestly really love the way your library works and would prefer to use it if possible. 😄 Huge thanks! |
The answer at https://sourceforge.net/p/sevenzip/discussion/45797/thread/79ecaee0/ may be helpful.
|
As it seems SevenZipExtractor cannot handle multi file archives, can it?
-> exception
The text was updated successfully, but these errors were encountered: