mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #707] [CLOSED] Added SupportsRandomAccess property to IArchiveFactory #1173
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/707
Author: @vpenades
Created: 11/28/2022
Status: ❌ Closed
Base:
master← Head:master📝 Commits (1)
dd0d046Added 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.