mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
Add LzwReader Support for .Z Archives Using LzwStream #666
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 @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
LzwStreamfor 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 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?
@adanddev commented on GitHub (Dec 20, 2024):
Yes, there is support for extracting .Z files when they are part of a
.tar.Zarchive (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 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().