[PR #707] Added SupportsRandomAccess property to IArchiveFactory #1175

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

Original Pull Request: https://github.com/adamhathcock/sharpcompress/pull/707

State: closed
Merged: No


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.

**Original Pull Request:** https://github.com/adamhathcock/sharpcompress/pull/707 **State:** closed **Merged:** No --- 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.
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#1175