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
                    
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.XZ" Version="11.0.165" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Compression.XZ" Version="11.0.165" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Compression.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.XZ --version 11.0.165
                    
#r "nuget: Soenneker.Compression.XZ, 11.0.165"
                    
#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.XZ@11.0.165
                    
#: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.XZ&version=11.0.165
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Compression.XZ&version=11.0.165
                    
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.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 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 (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
Loading failed

Updated Soenneker.Utils.File to 11.0.2344