Lzip.Lib 1.1.141

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

Lzip.Lib

Pure-managed lzip (LZMA1) codec for .NET -- a fast, AOT/trim-friendly compressor and decompressor for the lzip container format, including multi-member files that are decoded in parallel. Output is read by the reference lzip binary. No external lzip binary required.

1.0 shipped the decoder; 1.1 adds the encoder (LZMA1 + lzip member framing + -b-style member splitting).

Install

dotnet add package Lzip.Lib

Usage

using SharpAstro.Lzip;

// From a byte array:
byte[] data = LzipDecoder.Decompress(File.ReadAllBytes("catalog.lz"));

// From a stream:
using var stream = File.OpenRead("catalog.lz");
byte[] fromStream = LzipDecoder.Decompress(stream);

// As a read-only MemoryStream (decoded whole before it returns; the input is not disposed):
using var file = File.OpenRead("catalog.lz");
using var decompressed = LzipDecoder.DecompressToStream(file);

Every member is checked against its trailer as the reference lzip checks it (the CRC32 of the data, the data size and the member size), and corrupt input of any kind throws InvalidDataException.

Multi-member lzip files (e.g. produced by lzip -b) are detected and decoded across cores automatically.

Compressing

using SharpAstro.Lzip;

// Best ratio (approximates `lzip -9`), single member:
byte[] lz = LzipEncoder.Compress(File.ReadAllBytes("catalog.json"));

// Choose a level (0..9) and split into independent members for parallel decode (like `lzip -b`):
byte[] chunked = LzipEncoder.Compress(data, new LzipOptions { Level = 9, MemberSize = 2 << 20 });

// Stream in / stream out:
using var input = File.OpenRead("catalog.json");
using var output = File.Create("catalog.json.lz");
LzipEncoder.Compress(input, output);

LzipOptions.Level (0..9) selects lzip's dictionary size and match-length limit; DictionarySize and MatchLenLimit override them; MemberSize (uncompressed bytes per member, 0 = single) enables -b-style splitting. The output is standard lzip -- verified against the reference lzip -t/-d.

Format notes

Each lzip member is a 6-byte header ("LZIP" magic + version + coded dictionary size) followed by an LZMA1 stream (fixed properties lc=3, lp=0, pb=2) and a 20-byte trailer (CRC32 of the uncompressed data + uncompressed size + member size). A multi-member file is simply independent members concatenated.

Attribution

The LZMA1 compression core (src/Lzip.Lib/Lzma/) is vendored from the public-domain 7-Zip LZMA SDK by Igor Pavlov (https://www.7-zip.org/sdk.html). The only edits vs upstream are a #nullable disable header and making the namespace-level types internal so Lzip.Lib's public API stays SharpAstro.Lzip.*. The decoder and the lzip container framing (LzipDecoder, LzipEncoder, LzipFraming) are original code. The lzip format itself was created by Antonio Diaz Diaz; this library was validated for compatibility against the reference lzip binary but contains no lzip (GPL) source.

License

MIT -- see LICENSE. The vendored LZMA SDK is public domain.

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. 
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 Lzip.Lib:

Package Downloads
TianWen.Lib

Astronomical imaging and device-control library for .NET: cameras, mounts, focusers, filter wheels, cover/calibrators and guiders over ASCOM, Alpaca, ZWO, QHYCCD, Meade LX200, Skywatcher, OnStep and PHD2, plus plate solving, deep-sky and planetary stacking, auto-focus and unattended session automation. First-class multi-OTA (dual rig) support. AOT compatible.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.141 1,044 10/14/2026
1.1.121 155 10/13/2026
1.1.111 1,374 10/10/2026
1.1.101 476 10/9/2026
1.1.91 7,883 8/20/2026
1.1.81 546 8/2/2026
1.1.71 48 8/2/2026
1.1.41 580 7/4/2026
1.0.21 60 7/4/2026