mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[proposal] IArchiveFactory #523
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?
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
IArchiveFactoryinterface and aRegisterFactory(IArchiveFactory customArchive)method so developers could inject support for additional archive formats.@adamhathcock commented on GitHub (Jun 13, 2022):
That's not a bad idea though I'd like people to contribute missing formats if possible!
@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
@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.
@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...