Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[proposal] IArchiveFactory #670

Closed
vpenades opened this issue Jun 12, 2022 · 4 comments
Closed

[proposal] IArchiveFactory #670

vpenades opened this issue Jun 12, 2022 · 4 comments

Comments

@vpenades
Copy link
Contributor

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.

@adamhathcock
Copy link
Owner

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

@vpenades
Copy link
Contributor Author

vpenades commented 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
Copy link
Owner

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
Copy link
Contributor Author

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants