mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-08 21:21:57 +00:00
[PR #661] [MERGED] Added multipart Zip support (z01...). Added IEntry.IsSolid #1146
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/661
Author: @Nanook
Created: 4/25/2022
Status: ✅ Merged
Merged: 4/29/2022
Merged by: @adamhathcock
Base:
master← Head:master📝 Commits (3)
2246143Added multipart Zip support (z01...). Added IEntry.IsSolid and implemented Rar and 7Zi[ support.71c8f31RarStream Position fix, it was returning the file size. 7Zip CrcCheckStream always failed. Added a Solid Rar entry CRC test.910aa1cCorrected the Crc exception as it was within a #DEBUG define📊 Changes
27 files changed (+305 additions, -52 deletions)
View changed files
📝
.gitignore(+1 -0)📝
src/SharpCompress/Archives/AbstractWritableArchive.cs(+7 -1)📝
src/SharpCompress/Archives/ArchiveFactory.cs(+17 -1)📝
src/SharpCompress/Archives/Rar/RarArchiveEntry.cs(+1 -0)📝
src/SharpCompress/Archives/SevenZip/SevenZipArchive.cs(+14 -2)📝
src/SharpCompress/Archives/Zip/ZipArchive.cs(+78 -17)📝
src/SharpCompress/Common/Entry.cs(+1 -1)📝
src/SharpCompress/Common/IEntry.cs(+1 -0)📝
src/SharpCompress/Compressors/LZMA/Utilites/CrcCheckStream.cs(+12 -7)📝
src/SharpCompress/Compressors/Rar/RarStream.cs(+7 -3)📝
src/SharpCompress/IO/SplitStream.cs(+52 -16)📝
tests/SharpCompress.Test/ArchiveTests.cs(+30 -1)📝
tests/SharpCompress.Test/Rar/RarArchiveTests.cs(+39 -1)📝
tests/SharpCompress.Test/SevenZip/SevenZipArchiveTests.cs(+11 -1)📝
tests/SharpCompress.Test/Zip/ZipArchiveTests.cs(+34 -1)➕
tests/TestArchives/Archives/7Zip.nonsolid.7z(+0 -0)➕
tests/TestArchives/Archives/7Zip.solid.7z(+0 -0)➕
tests/TestArchives/Archives/DotNetZip-obhg3mhx.tmp(+0 -0)➕
tests/TestArchives/Archives/Infozip.nocomp.multi.z01(+0 -0)➕
tests/TestArchives/Archives/Infozip.nocomp.multi.zip(+0 -0)...and 7 more files
📄 Description
Multi Volume Zip support for zip and zipx
Unit tests added for multipart archives created with WinZip and InfoZip. They are uncompressed due to the minimum part size being 65k.
The implementation is a little bit clunky. It requires the parts to be passed in in the order zip,z01 / zipx,zx01 ..., the zip is actually the last part of the archive. Once the central directory has been located and the archive is being opened the zip is switched to the end of the volumes for processing. Is seems more logical the user would select the zip/zipx not the z01/zx01. Feel free to reimplement this as your knowledge of zip is better than mine ;-)
IEntry.IsSolid for rar and 7zip
It's useful to know which files in an archive can be seeked and extracted. The Rar format sets the first file to solid=false and subsequent files in a solid set to solid=true. This allows solid-false files to be opened with seek. The 7zip implementation follows this behaviour. IsSolid already existed for Rar Entries, but it was never populated when using Archive.Open.
Cheers ;-)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.