Soenneker.Compression.XZ
11.0.165
Prefix Reserved
dotnet add package Soenneker.Compression.XZ --version 11.0.165
NuGet\Install-Package Soenneker.Compression.XZ -Version 11.0.165
<PackageReference Include="Soenneker.Compression.XZ" Version="11.0.165" />
<PackageVersion Include="Soenneker.Compression.XZ" Version="11.0.165" />
<PackageReference Include="Soenneker.Compression.XZ" />
paket add Soenneker.Compression.XZ --version 11.0.165
#r "nuget: Soenneker.Compression.XZ, 11.0.165"
#:package Soenneker.Compression.XZ@11.0.165
#addin nuget:?package=Soenneker.Compression.XZ&version=11.0.165
#tool nuget:?package=Soenneker.Compression.XZ&version=11.0.165
Soenneker.Compression.XZ
Streams an XZ-compressed file to a decompressed output file.
Install
dotnet add package Soenneker.Compression.XZ
Registration
using Soenneker.Compression.XZ.Registrars;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddXZUtilAsSingleton();
Use AddXZUtilAsScoped() instead when its lifetime should follow a dependency-injection scope.
Usage
using Soenneker.Compression.XZ.Abstract;
public sealed class SnapshotDecoder(IXZUtil xzUtil)
{
public ValueTask Decode(CancellationToken cancellationToken = default)
{
return xzUtil.Decompress("snapshot.json.xz", "snapshot.json", cancellationToken);
}
}
The decoder writes to a uniquely named sibling file and moves it over outputFilePath only after decompression succeeds. An existing output therefore remains intact if decoding fails or is cancelled.
Practical notes
- The output file's parent directory must already exist.
- A successfully decoded file replaces an existing output at the requested path.
- Temporary output is removed after failure or cancellation.
- Decompressed data is streamed with a 128 KiB buffer rather than loaded into memory.
- This package decompresses XZ; it does not create XZ streams.
- XZ files can expand substantially. Enforce input and storage limits before decoding untrusted content.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Lzma.Net (>= 5.8.4.4)
- Soenneker.Utils.File (>= 11.0.2344)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Compression.XZ:
| Package | Downloads |
|---|---|
|
Soenneker.Compression.Tar.XZ
A utility library dealing with Tar and XZ (tar.xz) extraction/archiving and (de)compression |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.165 | 0 | 11/15/2026 |
| 11.0.164 | 53 | 11/14/2026 |
| 11.0.162 | 135 | 11/11/2026 |
| 11.0.161 | 119 | 11/11/2026 |
| 11.0.160 | 89 | 11/11/2026 |
| 11.0.159 | 97 | 11/11/2026 |
| 11.0.158 | 229 | 11/3/2026 |
| 11.0.157 | 127 | 11/3/2026 |
| 11.0.156 | 101 | 11/3/2026 |
| 11.0.155 | 105 | 11/3/2026 |
| 11.0.154 | 224 | 10/29/2026 |
| 11.0.153 | 132 | 10/27/2026 |
| 11.0.152 | 135 | 10/27/2026 |
| 11.0.151 | 121 | 10/26/2026 |
| 11.0.150 | 93 | 10/26/2026 |
| 11.0.149 | 142 | 10/26/2026 |
| 11.0.148 | 129 | 10/26/2026 |
| 4.0.147 | 231 | 10/15/2026 |
| 4.0.146 | 111 | 10/15/2026 |
| 4.0.145 | 110 | 10/14/2026 |
Updated Soenneker.Utils.File to 11.0.2344