Soenneker.Compression.Tar.XZ 11.0.475

Prefix Reserved
dotnet add package Soenneker.Compression.Tar.XZ --version 11.0.475
                    
NuGet\Install-Package Soenneker.Compression.Tar.XZ -Version 11.0.475
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Compression.Tar.XZ" Version="11.0.475" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Compression.Tar.XZ" Version="11.0.475" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Compression.Tar.XZ" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Compression.Tar.XZ --version 11.0.475
                    
#r "nuget: Soenneker.Compression.Tar.XZ, 11.0.475"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Compression.Tar.XZ@11.0.475
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Compression.Tar.XZ&version=11.0.475
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Compression.Tar.XZ&version=11.0.475
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Compression.Tar.XZ

Decompresses an XZ-compressed TAR archive and extracts its contents into a directory.

Install

dotnet add package Soenneker.Compression.Tar.XZ

Registration

using Soenneker.Compression.Tar.XZ.Registrars;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
services.AddTarXZUtilAsSingleton();

Use AddTarXZUtilAsScoped() when its lifetime should follow a dependency-injection scope. Both registrations include the required TAR, XZ, file, and directory utilities.

Usage

using Soenneker.Compression.Tar.XZ.Abstract;

public sealed class PackageImporter(ITarXZUtil tarXzUtil)
{
    public ValueTask Import(string archivePath, string destinationPath, CancellationToken cancellationToken = default)
    {
        return tarXzUtil.DecompressAndExtract(archivePath, destinationPath, cancellationToken: cancellationToken);
    }
}

By default, the intermediate TAR is written to a private temporary directory and removed after extraction, including when extraction fails or is cancelled.

To control where the intermediate TAR is written, pass decompressedFileDir. Set deleteDecompressedFile: false only when you need to retain that TAR:

await tarXzUtil.DecompressAndExtract(
    "backup.tar.xz",
    "extracted",
    decompressedFileDir: "work",
    deleteDecompressedFile: false,
    cancellationToken);

Practical notes

  • The destination directory is caller-owned. Files extracted before a failure or cancellation are not removed.
  • The TAR extraction stage rejects links, path traversal, and destination collisions.
  • Archive path checks do not impose expansion limits. Apply file-count, output-size, and storage quotas when handling untrusted archives.
Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.475 40 11/15/2026
11.0.474 46 11/15/2026
11.0.473 62 11/15/2026
11.0.472 279 11/13/2026
11.0.471 73 11/11/2026
11.0.469 58 11/11/2026
11.0.468 55 11/11/2026
11.0.467 54 11/11/2026
11.0.466 56 11/11/2026
11.0.465 50 11/11/2026
11.0.464 54 11/11/2026
11.0.463 54 11/11/2026
11.0.462 53 11/11/2026
11.0.461 194 11/3/2026
11.0.460 99 11/3/2026
11.0.459 91 11/3/2026
11.0.458 96 11/3/2026
11.0.457 88 11/3/2026
11.0.456 95 11/3/2026
11.0.455 97 11/3/2026
Loading failed

Updated Soenneker.Compression.XZ to 11.0.165