sharpcompress icon indicating copy to clipboard operation
sharpcompress copied to clipboard

xz compression not supported

Open laraaj opened this issue 3 years ago • 1 comments

Hi,

I just tested the following code to compress a folder into file Archive.tar.xz

            using (Stream stream = File.OpenWrite("../Archive.tar.xz"))
            using (var writer = WriterFactory.Open(stream, ArchiveType.Tar, CompressionType.Xz))
            {
                
                writer.WriteAll(".", "*", SearchOption.AllDirectories);
            }

but it returned the following error :

SharpCompress.Common.InvalidFormatException: 'Tar does not support compression: Xz'

is .xz compression supported ?

laraaj avatar Oct 20 '22 17:10 laraaj

Xz is decompression only https://github.com/adamhathcock/sharpcompress/blob/master/FORMATS.md

adamhathcock avatar Oct 21 '22 07:10 adamhathcock