[PR #707] [CLOSED] Added SupportsRandomAccess property to IArchiveFactory #1173

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

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/707
Author: @vpenades
Created: 11/28/2022
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • dd0d046 Added SupportsRandomAccess property to IArchiveFactory

📊 Changes

6 files changed (+23 additions, -1 deletions)

View changed files

📝 src/SharpCompress/Archives/GZip/GZipArchiveFactory.cs (+3 -0)
📝 src/SharpCompress/Archives/IArchiveFactory.cs (+7 -1)
📝 src/SharpCompress/Archives/Rar/RarArchiveFactory.cs (+3 -0)
📝 src/SharpCompress/Archives/SevenZip/SevenZipArchiveFactory.cs (+3 -0)
📝 src/SharpCompress/Archives/Tar/TarArchiveFactory.cs (+4 -0)
📝 src/SharpCompress/Archives/Zip/ZipArchiveFactory.cs (+3 -0)

📄 Description

I've been using tgz files and I've realized they require being opened using the IReader interface to read them sequentially.

I thought it could be useful to embed that knowledge in the IArchiveFactory.

So both TAR and GZip factories have that property set to false.

This way, a program that wants to open any kind of archive, would know beforehand which is the preferred way of reading the archive and adjust accordingly.

Also added the "tgz" extension to tar factory.... I guess it would also require "tar.gz" but I'm hesitant to add extensions with extra dots.


🔄 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/707 **Author:** [@vpenades](https://github.com/vpenades) **Created:** 11/28/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`dd0d046`](https://github.com/adamhathcock/sharpcompress/commit/dd0d046457cd8d3e12005c85107c3ff0d6c984b9) Added SupportsRandomAccess property to IArchiveFactory ### 📊 Changes **6 files changed** (+23 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/SharpCompress/Archives/GZip/GZipArchiveFactory.cs` (+3 -0) 📝 `src/SharpCompress/Archives/IArchiveFactory.cs` (+7 -1) 📝 `src/SharpCompress/Archives/Rar/RarArchiveFactory.cs` (+3 -0) 📝 `src/SharpCompress/Archives/SevenZip/SevenZipArchiveFactory.cs` (+3 -0) 📝 `src/SharpCompress/Archives/Tar/TarArchiveFactory.cs` (+4 -0) 📝 `src/SharpCompress/Archives/Zip/ZipArchiveFactory.cs` (+3 -0) </details> ### 📄 Description I've been using tgz files and I've realized they require being opened using the IReader interface to read them sequentially. I thought it could be useful to embed that knowledge in the IArchiveFactory. So both TAR and GZip factories have that property set to false. This way, a program that wants to open any kind of archive, would know beforehand which is the preferred way of reading the archive and adjust accordingly. Also added the "tgz" extension to tar factory.... I guess it would also require "tar.gz" but I'm hesitant to add extensions with extra dots. --- <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:20 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1173