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

Add LzwReader Support for .Z Archives Using LzwStream #880

Open
adanddev opened this issue Nov 13, 2024 · 3 comments
Open

Add LzwReader Support for .Z Archives Using LzwStream #880

adanddev opened this issue Nov 13, 2024 · 3 comments

Comments

@adanddev
Copy link

Please consider to add support for reading .Z compressed archives by implementing an LzwReader (name can be different) that uses LzwStream for decompression. This new reader should follow the design patterns of existing readers, such as GZipReader, so that it can be created through the standard factory methods in SharpCompress.

@Erior
Copy link
Contributor

Erior commented Dec 20, 2024

Don't we already support decompress .Z, as in test file Tar.tar.Z ?
or are you looking for creating .Z files?

@adanddev
Copy link
Author

adanddev commented Dec 20, 2024

Yes, there is support for extracting .Z files when they are part of a .tar.Z archive (e.g., Tar.tar.Z), but what I'm referring to is the ability to extract standalone .Z files, such as file.Z, that do not contain a tarball inside. These files are simply compressed using LZW without any additional archive format.

Currently, it seems we lack support for directly decompressing such standalone .Z files. Adding this capability would make SharpCompress more versatile for handling legacy compression formats.

@neumatho
Copy link

You can use e.g. XZStream() or some of the others. I do that to get this functionality in my project. To be sure the file is in the right format, you can use XZStream.IsXZStream().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants