IGzip.Bindings 1.0.0

dotnet add package IGzip.Bindings --version 1.0.0
                    
NuGet\Install-Package IGzip.Bindings -Version 1.0.0
                    
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="IGzip.Bindings" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IGzip.Bindings" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="IGzip.Bindings" />
                    
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 IGzip.Bindings --version 1.0.0
                    
#r "nuget: IGzip.Bindings, 1.0.0"
                    
#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 IGzip.Bindings@1.0.0
                    
#: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=IGzip.Bindings&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=IGzip.Bindings&version=1.0.0
                    
Install as a Cake Tool

IGzip.Bindings

.NET 10+ bindings for Intel ISA-L's igzip: one-shot zlib, raw deflate and gzip compression over Span<byte>, with no streams and no managed allocations per call.

ISA-L is the fastest deflate encoder we measured for small payloads (gump and house-design packets): at level 1 it compresses about 1.8x faster than libdeflate level 1 at a similar ratio, and its decoder is within about 10% of libdeflate's.

Usage

using System.IO.Compression;

// One instance per thread; reuse it. Not thread safe.
using var igzip = new IGzipBinding(IGzipCompressionLevel.Level1, IGzipFormat.Zlib);

var packed = new byte[igzip.MaxPackSize(source.Length)];
var packedLength = igzip.Pack(packed, source);          // 0 if the destination is too small

var result = igzip.Unpack(dest, packed.AsSpan(0, packedLength), out var length);

IGzipFormat.Zlib produces exactly what zlib's compress()/uncompress() read and write (2-byte header, Adler-32 trailer). Deflate is raw RFC 1951 and Gzip is RFC 1952.

Levels: Level0 is fastest but uses static Huffman tables and compresses much worse; Level1 is the right default for small payloads; Level3 is slower for a slightly better ratio.

Native library

Platform Source
Windows x64 bundled (runtimes/win-x64/native/isa-l.dll)
macOS arm64 bundled (runtimes/osx-arm64/native/libisal.dylib)
Linux the distro package, below

The bundled binaries are built by .github/workflows/natives.yml from a pinned ISA-L release tag; see THIRD-PARTY-NOTICES.md.

On Linux install the runtime package. The -dev package is not required: the binding probes the versioned libisal.so.N itself.

sudo apt-get install -y libisal2                                    # Debian / Ubuntu
sudo dnf install -y isa-l                                           # Fedora
sudo dnf install -y epel-release && sudo dnf install -y isa-l       # RHEL / Rocky / Alma
apk add isa-l                                                       # Alpine
sudo pacman -S isa-l                                                # Arch

Distro builds are fully optimized: ISA-L picks its SSE/AVX2/AVX-512 (or NEON) kernels at runtime from the CPU.

The binding drives ISA-L's stateless API through fixed struct offsets. Those layouts are identical in every ISA-L release from 2.28 through 2.32.1 on Windows, glibc and musl, and CI re-checks them against each distro's headers.

License

IGzip.Bindings is licensed under the BSD 2-Clause License. The bundled ISA-L binaries are BSD-3-Clause; see THIRD-PARTY-NOTICES.md.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.

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
1.0.0 1,362 11/19/2026