[PR #662] [MERGED] Properly integrated zip multivolume and general split support. #1147

Open
opened 2026-01-29 22:19:12 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/662
Author: @Nanook
Created: 4/30/2022
Status: Merged
Merged: 5/3/2022
Merged by: @adamhathcock

Base: masterHead: master


📝 Commits (1)

  • 61c01ce Properly integrated zip multivolume and split support.

📊 Changes

18 files changed (+746 additions, -546 deletions)

View changed files

📝 src/SharpCompress/Archives/AbstractArchive.cs (+10 -21)
📝 src/SharpCompress/Archives/AbstractWritableArchive.cs (+3 -13)
📝 src/SharpCompress/Archives/ArchiveFactory.cs (+81 -24)
src/SharpCompress/Archives/ArchiveVolumeFactory.cs (+29 -0)
📝 src/SharpCompress/Archives/GZip/GZipArchive.cs (+35 -25)
📝 src/SharpCompress/Archives/Rar/RarArchive.cs (+40 -27)
📝 src/SharpCompress/Archives/Rar/RarArchiveVolumeFactory.cs (+17 -117)
📝 src/SharpCompress/Archives/SevenZip/SevenZipArchive.cs (+37 -24)
📝 src/SharpCompress/Archives/Tar/TarArchive.cs (+35 -25)
📝 src/SharpCompress/Archives/Zip/ZipArchive.cs (+54 -49)
src/SharpCompress/Archives/Zip/ZipArchiveVolumeFactory.cs (+34 -0)
src/SharpCompress/IO/SourceStream.cs (+215 -0)
src/SharpCompress/IO/SplitStream.cs (+0 -186)
📝 src/SharpCompress/SharpCompress.csproj (+2 -0)
📝 tests/SharpCompress.Test/ArchiveTests.cs (+9 -32)
📝 tests/SharpCompress.Test/Rar/RarArchiveTests.cs (+76 -1)
📝 tests/SharpCompress.Test/SevenZip/SevenZipArchiveTests.cs (+15 -1)
📝 tests/SharpCompress.Test/Zip/ZipArchiveTests.cs (+54 -1)

📄 Description

Proper multi volume zip and generic split support.

SplitStream has been renamed to SourceStream and supports multi and split archives. It's able to lookup missing parts.

  • The 5 Archive types have all been changed to add more static Open() methods.
  • The 5 Archive types now only have one constuctor for reading that accepts a SourceStream. Writing are left unchanged
  • The 5 Archive types now only have one LoadVolumes method that accepts a SourceStream

A new static method has been added to ArchiveFactory. It's a utility method called GetFileParts() that will take a file name/FileInfo and return all the files that are part of the set. It might be handy for people wanting to scan folders for archives and gather the other part names.

ArchiveFactory is cleaner as the multipart / split code that was in there is no longer required.

All tests are passing with no changes. More have been added to demonstrate new behaviour.

Cheers ;-)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/adamhathcock/sharpcompress/pull/662 **Author:** [@Nanook](https://github.com/Nanook) **Created:** 4/30/2022 **Status:** ✅ Merged **Merged:** 5/3/2022 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`61c01ce`](https://github.com/adamhathcock/sharpcompress/commit/61c01ce9b083ed9c23229ee4d75975cfa0aa58e1) Properly integrated zip multivolume and split support. ### 📊 Changes **18 files changed** (+746 additions, -546 deletions) <details> <summary>View changed files</summary> 📝 `src/SharpCompress/Archives/AbstractArchive.cs` (+10 -21) 📝 `src/SharpCompress/Archives/AbstractWritableArchive.cs` (+3 -13) 📝 `src/SharpCompress/Archives/ArchiveFactory.cs` (+81 -24) ➕ `src/SharpCompress/Archives/ArchiveVolumeFactory.cs` (+29 -0) 📝 `src/SharpCompress/Archives/GZip/GZipArchive.cs` (+35 -25) 📝 `src/SharpCompress/Archives/Rar/RarArchive.cs` (+40 -27) 📝 `src/SharpCompress/Archives/Rar/RarArchiveVolumeFactory.cs` (+17 -117) 📝 `src/SharpCompress/Archives/SevenZip/SevenZipArchive.cs` (+37 -24) 📝 `src/SharpCompress/Archives/Tar/TarArchive.cs` (+35 -25) 📝 `src/SharpCompress/Archives/Zip/ZipArchive.cs` (+54 -49) ➕ `src/SharpCompress/Archives/Zip/ZipArchiveVolumeFactory.cs` (+34 -0) ➕ `src/SharpCompress/IO/SourceStream.cs` (+215 -0) ➖ `src/SharpCompress/IO/SplitStream.cs` (+0 -186) 📝 `src/SharpCompress/SharpCompress.csproj` (+2 -0) 📝 `tests/SharpCompress.Test/ArchiveTests.cs` (+9 -32) 📝 `tests/SharpCompress.Test/Rar/RarArchiveTests.cs` (+76 -1) 📝 `tests/SharpCompress.Test/SevenZip/SevenZipArchiveTests.cs` (+15 -1) 📝 `tests/SharpCompress.Test/Zip/ZipArchiveTests.cs` (+54 -1) </details> ### 📄 Description Proper multi volume zip and generic split support. SplitStream has been renamed to SourceStream and supports multi and split archives. It's able to lookup missing parts. - The 5 Archive types have all been changed to add more static Open() methods. - The 5 Archive types now only have one constuctor for reading that accepts a SourceStream. Writing are left unchanged - The 5 Archive types now only have one LoadVolumes method that accepts a SourceStream A new static method has been added to ArchiveFactory. It's a utility method called GetFileParts() that will take a file name/FileInfo and return all the files that are part of the set. It might be handy for people wanting to scan folders for archives and gather the other part names. ArchiveFactory is cleaner as the multipart / split code that was in there is no longer required. All tests are passing with no changes. More have been added to demonstrate new behaviour. Cheers ;-) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 22:19:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1147