How to convert and view XZ files

XZ files are XZipped archive files, this format is a high-ratio compression algorithm based on the LZMA algorithm.
This archive format like GZip can compress only a single file, not multiple files or folders.
So it is mostly used with TAR (TXZ) - multiple files/folders compressed into single file TAR after it is compressed with XZip. TXZ format is also supported and described in the following article. Unlike GZip, XZip does not store archived file name. Filename will be determined by archive name: for example test.doc.xz will “test.doc” after unpack, and “test.xls.xz” will be “test.xls”.

Extension: XZ

XZ archives can be opened with WinRar.

Archive in WinRar

How to convert XZ archive files

Convert archive files to HTML

To convert archive files to multiple pages HTML with GroupDocs.Viewer for .NET use following code:

using (Viewer viewer = new Viewer("sample.vb.xz"))
{
       HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources("output_page.html");
       viewer.View(options);
}

The following screenshot shows the output HTML file opened in a browser.

Multiple pages HTML converted archive

Convert archive files to JPG

To convert archive files to JPG with GroupDocs.Viewer for .NET use following code:

using (Viewer viewer = new Viewer("sample.vb.xz"))
{
       JpgViewOptions options = new JpgViewOptions("output_page.jpg");
       viewer.View(options);
}

The following screenshot shows the output JPG file opened in a Windows Photo Viewer application.

JPEG converted archive

Convert archive files to PNG

To convert archive files to PNG with GroupDocs.Viewer for .NET use following code:

using (Viewer viewer = new Viewer("sample.vb.xz"))
{
       PngViewOptions options = new PngViewOptions("output_page.png");
       viewer.View(options);
}

The following screenshot shows the output PNG file opened in a Windows Photo Viewer application.

PNG converted archive

Convert archive to PDF

To convert Roshal Archive files to PDF with GroupDocs.Viewer for .NET use following code:

using (Viewer viewer = new Viewer("sample.vb.xz"))
{
       PdfViewOptions options = new PdfViewOptions("output.pdf");
       viewer.View(options);
}

The following screenshot shows the output PDF file opened in an Acrobat Reader.

PDF converted archive

More resources

View Archive Files Online

Along with full-featured .NET library we provide simple but powerful free online Apps. View ZIP and TAR files online with GroupDocs Viewer App.

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples: