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
<PackageReference Include="Soenneker.Compression.Tar.XZ" Version="11.0.475" />
<PackageVersion Include="Soenneker.Compression.Tar.XZ" Version="11.0.475" />
<PackageReference Include="Soenneker.Compression.Tar.XZ" />
paket add Soenneker.Compression.Tar.XZ --version 11.0.475
#r "nuget: Soenneker.Compression.Tar.XZ, 11.0.475"
#:package Soenneker.Compression.Tar.XZ@11.0.475
#addin nuget:?package=Soenneker.Compression.Tar.XZ&version=11.0.475
#tool nuget:?package=Soenneker.Compression.Tar.XZ&version=11.0.475
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Compression.Tar (>= 11.0.138)
- Soenneker.Compression.XZ (>= 11.0.165)
- Soenneker.Utils.Directory (>= 11.0.981)
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 |
Updated Soenneker.Compression.XZ to 11.0.165