Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the 7z SDK to compress and decompress a XZ file

Tags:

c#

xz

How can I use 7z SDK (http://www.7-zip.org/sdk.html) to compress/decompress a XZ file in C# if the input/output is a file stream?

like image 222
user3125559 Avatar asked Dec 20 '25 12:12

user3125559


1 Answers

I researched this problem by myself. In fact, you can't decompress XZ files using 7-Zip SDK for C#.

From http://www.7-zip.org/sdk.html:

ANSI-C compatible source code for LZMA / LZMA2 / XZ compression and decompression

C# source code for LZMA compression and decompression

There is XZ and LZMA2 decoder source code only for ANSI-C. C# has only LZMA decoder. However you can still decode XZ in C# using third party binaries from xzutils.

like image 82
stil Avatar answered Dec 23 '25 03:12

stil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!