Add LzwReader Support for .Z Archives Using LzwStream #666

Open
opened 2026-01-29 22:15:29 +00:00 by claunia · 3 comments
Owner

Originally created by @adanddev on GitHub (Nov 13, 2024).

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.

Originally created by @adanddev on GitHub (Nov 13, 2024). 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.
claunia added the enhancementup for grabs labels 2026-01-29 22:15:29 +00:00
Author
Owner

@Erior commented on GitHub (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?

@Erior commented on GitHub (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?
Author
Owner

@adanddev commented on GitHub (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.

@adanddev commented on GitHub (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.
Author
Owner

@neumatho commented on GitHub (Dec 20, 2024):

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().

@neumatho commented on GitHub (Dec 20, 2024): 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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#666