LZIP (.lz)

LZMA-based format with CRC and integrity checks.

Overview

An lzip member has a 6-byte header (magic LZIP, version, dictionary size code) followed by an LZMA stream with end marker and a 20-byte trailer of CRC-32, data size and member size. Members may be concatenated.

Where it is used

  • GNU software source distribution and long-term archives.

History

  • Created by Antonio Diaz Diaz in 2008.

Status today

  • Niche but maintained.

Structures read by the implementation

Offsets are in bytes from the start of the buffer named in each heading. Field names are taken from the implementation and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.

LzipArchiveModule.Decode buffer data · LzipArchiveModule.cs

OffsetSizeTypeFieldNotes
start + 51u8Code
start + size – 168u64 LEStored Size
start + size – 204u32 LEStored Crc

LzipArchiveModule.FindMembers buffer data · LzipArchiveModule.cs

OffsetSizeTypeFieldNotes
0x04bytes–
end – 88u64 LEEmber Size

LzipArchiveModule.Probe buffer h · LzipArchiveModule.cs

OffsetSizeTypeFieldNotes
0x04bytes–
0x41u8–

Other fields read

Read inOffsetSizeTypeFieldNotes
LzipArchiveModule.Mountstart + memberSize – 168u64 LE–

Constants

General LzipCarver

NameValueTypeNotes
HeaderSize6int
TrailerSize20int

General LzipArchiveModule

NameValueTypeNotes
Magic“LZIP”u8.ToArray()byte[]

Implementation limits reader

ClassNameValueNotes
LzipCarverMaxMembers100_000

Signatures and magic strings referenced

TextWhereContext
LZIPLzipArchiveModuleprivate static readonly byte[] Magic = “LZIP”u8.ToArray();
Structures and constants were extracted from: Carving/Plugins/Compressed/LzipCarver.cs, Modules/FileSystems/LzipArchiveModule.cs. Prose sections are a summary from public sources; verify details before relying on them.