mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
Extracting taz files (LZW) #199
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 @pjeannet on GitHub (Jun 30, 2017).
Hi, I know that Z archives are not officially supported but I can't find a lib able to open taz archives (or tar.z). Do you confirm that these archives are not supported?
I can't change the original sources and opening all the archives by hand with 7zip does not seem too appealing.
Thanks
@adamhathcock commented on GitHub (Jun 30, 2017):
What is a Z archive?
According to this: https://en.wikipedia.org/wiki/List_of_archive_formats It's just a deflate stream with a tar underneath. You should be able to use SharpCompress but it isn't supported in the detection under
ReaderFactoryUpper case Z is LZW which isn't supported (might be easy to add an implementation though)You'd just decompress the file initially with a DeflateStream then pass the stream to a
TarReader. That might work. You'll have to test it.@pjeannet commented on GitHub (Jun 30, 2017):
Not really sure myself, I got some .taz files and a quick search told me it was for .tar.Z and an old format. 7zip ingo on the archive confirmed the Z compression part.
Fun part is that the recent files were decompressed by the readerfactory but not the old ones. Make me think that recent ones are .tar.gz renamed in .taz by the people editing these sources.
I'll see on monday if the deflatestream works but I'm affraid it is LZW (7zip info gives upper case Z as compression format)
Side question : are .tar.gz supposed to be decompressed in one go by reader factory or should we do this in two steps?
@adamhathcock commented on GitHub (Jul 1, 2017):
Tar.gz should be done in a single usage of ReaderFactory as a feature. It takes care of decompressing as gzip then tar on the fly.
The same could be done for tar.z and tar.Z but the first just isn’t implemented and the second requires lzw which I don’t have at the moment.
@pjeannet commented on GitHub (Jul 3, 2017):
I just tested the deflate stream but got following error :
I'll have to do part of the work by hand and wait for some support (though I would understand if you don't have time for it as it is not a common format).
@adamhathcock commented on GitHub (Jul 5, 2017):
LZW might be easy to do with an existing implementation but yeah not a high priority for me. Pull requests are welcome :)