CrLZH

CRLZH (or CrLZH) is a single-file compression utility, and its associated file format, devised by Roger Warren and used on CP/M. The format is often referred to as just LZH, but it's not to be confused with the format used for .lzh files.

It came later than Squeeze and Crunch and generally achieved better compression than those formats. LZH files occurred standalone and as members in LBR archives. The underlying compression is based on that used by LHArc.

Similar to Squeeze and Crunch, these files were signified in CP/M's 8.3 filename format by replacing the middle letter of the extension with Y (.?Y?), with the extension .YYY used for corner cases such as a blank extension.

The compression schemes used by versions 1.x and 2.x are slightly different, but most decompression utilities support both.

Format details
The compression algorithm uses LZ77+Huffman, with adaptive Huffman coding. It is derived from the same source code as LHA's "lh1" compression, and is presumably quite similar to it. Differences include:
 * A 2K window instead of 4K
 * A special "EOF" code
 * In v2 format, offsets are encoded slightly differently.

Identification
Files begin with bytes.

Specifications

 * Some format information is in LZHREL.DOC shipped with CRLZH20.LBR
 * An extracted copy is provided here.
 * Note that the file header follows a similar/compatible structure to Crunch.

Tools

 * CFX (DOS/Unix)
 * lbrate by Russell Marks, c. 2001 (Unix, GPL2)
 * Unar
 * On CP/M (or emulators):
 * The original tools were those in the CRLZH distribution, e.g. CRLZH20.LBR
 * The later LT31 deals with extracting from all of Squeeze, Crunch, CrLZH and LBR formats. Widely available in CP/M archives, e.g. LT31.LBR
 * LZH21SRC.LBR - Version 2.x LZH-CP/M source code - R. Warren - 1991-08-23
 * LZH21SRC.LBR - Version 2.x LZH-CP/M source code - R. Warren - 1991-08-23

Sample files
Note that for files in LBR archives, you may have to tell your LBR utility not to decompress them (e.g. ).


 * crlzh11.lbr → *.?y*
 * crlzh20.lbr → *.?y*
 * https://telparia.com/fileFormatSamples/archive/crLZH/