[proposal] IArchiveFactory #523

Closed
opened 2026-01-29 22:13:17 +00:00 by claunia · 4 comments
Owner

Originally created by @vpenades on GitHub (Jun 12, 2022).

Right now, most archives are wrapped around interfaces, and it's useful to use these interfaces to wrap around custom or third party archive formats.

But right now the archive formats supported by SharpCompress is limited by ArchiveFactory static class

I believe it could be useful to have an IArchiveFactory interface and a RegisterFactory(IArchiveFactory customArchive) method so developers could inject support for additional archive formats.

Originally created by @vpenades on GitHub (Jun 12, 2022). Right now, most archives are wrapped around interfaces, and it's useful to use these interfaces to wrap around custom or third party archive formats. But right now the archive formats supported by SharpCompress is limited by ArchiveFactory static class I believe it could be useful to have an `IArchiveFactory `interface and a `RegisterFactory(IArchiveFactory customArchive)` method so developers could inject support for additional archive formats.
Author
Owner

@adamhathcock commented on GitHub (Jun 13, 2022):

That's not a bad idea though I'd like people to contribute missing formats if possible!

@adamhathcock commented on GitHub (Jun 13, 2022): That's not a bad idea though I'd like people to contribute missing formats if possible!
Author
Owner

@vpenades commented on GitHub (Jun 13, 2022):

I think you're covering most formats already?

There's some legacy formats that might be included, like ARJ, ACE, AIN that I think nobody uses anymore, but would it make sense to include them in the core library? In fact in these cases it would make more sense to include them as a separated library called SharpCompress.Legacy or something like that -this is just an example-

Then, I think people could use this extension to give support for game archives, like WAD, but I don't think you want to integrate these into the main library either.

Anyway, I would like to have this extensibility feature to support a proprietary archive we use for scientific data analysis; it's usually thousands of anotated small files which is convenient to move around as a single archive.

So, if you agree, I could contribute a PR with this interface

@vpenades commented on GitHub (Jun 13, 2022): I think you're covering most formats already? There's some legacy formats that might be included, like ARJ, ACE, AIN that I think nobody uses anymore, but would it make sense to include them in the core library? In fact in these cases it would make more sense to include them as a separated library called SharpCompress.Legacy or something like that -this is just an example- Then, I think people could use this extension to give support for game archives, like WAD, but I don't think you want to integrate these into the main library either. Anyway, I would like to have this extensibility feature to support a proprietary archive we use for scientific data analysis; it's usually thousands of anotated small files which is convenient to move around as a single archive. So, if you agree, I could contribute a PR with this interface
Author
Owner

@adamhathcock commented on GitHub (Jun 13, 2022):

Yeah, sure...make a PR to have a proper registry of formats. I may refactor more after seeing your PR 🤔

I don't have a big problem with legacy formats in general though.

@adamhathcock commented on GitHub (Jun 13, 2022): Yeah, sure...make a PR to have a proper registry of formats. I may refactor more after seeing your PR 🤔 I don't have a big problem with legacy formats in general though.
Author
Owner

@vpenades commented on GitHub (Nov 21, 2022):

Since it's been merged I think I can close this issue, unless there's something else that might be interesting to add to the interface...

@vpenades commented on GitHub (Nov 21, 2022): Since it's been merged I think I can close this issue, unless there's something else that might be interesting to add to the interface...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#523