xz compression not supported #538

Closed
opened 2026-01-29 22:13:26 +00:00 by claunia · 1 comment
Owner

Originally created by @laraaj on GitHub (Oct 20, 2022).

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 ?

Originally created by @laraaj on GitHub (Oct 20, 2022). 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 ?
Author
Owner

@adamhathcock commented on GitHub (Oct 21, 2022):

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

@adamhathcock commented on GitHub (Oct 21, 2022): Xz is decompression only https://github.com/adamhathcock/sharpcompress/blob/master/FORMATS.md
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#538