Skip to main content

Crate compcol

Crate compcol 

Source
Expand description

compcol — a collection of pure-Rust, no_std, 100% safe compression algorithms behind a uniform streaming trait.

Each algorithm sits behind its own Cargo feature so downstream crates only pay for what they use. An optional factory module provides runtime by-name lookup when the factory (and thus alloc) feature is enabled.

See Encoder, Decoder, and Algorithm for the contract every algorithm in this crate implements.

Modules§

adcadc
ADC (Apple Data Compression).
amiga_lzxamiga_lzx
Amiga LZX — the original 1995 Jonathan Forbes LZX codec used by the Amiga .lzx archive format.
arc_cruncharc_crunch
ARC “Crunch” — System Enhancement Associates ARC archiver method 8.
arc_squasharc_squash
ARC “Squashed” — System Enhancement Associates ARC archiver method 9.
arc_squeezearc_squeeze
ARC “Squeeze” — the CP/M SQ/USQ codec, ARC method 4.
arsenicarsenic
StuffIt 5 Arsenic (compression method 15) — decoder only.
bcjbcj
BCJ branch-converter filters (from the public-domain LZMA SDK lineage, as used by xz).
bcj2bcj2
BCJ2 — the 4-stream x86 branch-conversion filter (7-Zip filter id 0303011B), from the public-domain LZMA SDK.
brotlibrotli
Brotli (RFC 7932) — partial-but-functional implementation.
bwtbwt
Burrows–Wheeler Transform (BWT) — a standalone, reversible block codec.
bzip2bzip2
bzip2 (.bz2).
deflatedeflate
RFC 1951 deflate.
deflate64deflate64
PKWARE deflate64 (zip method 9).
deltadelta
Delta filter — byte-wise delta coding with a configurable distance.
factoryfactory
Runtime by-name lookup of algorithms.
gzipgzip
RFC 1952 gzip container around RFC 1951 deflate.
hpackhpack
HTTP/2 HPACK header compression — RFC 7541.
huffman_codechuffman
Standalone canonical (order-0) Huffman codec.
iostd
std::io::Read / std::io::Write adapters around any Encoder/Decoder.
lhalha
LHA / LZH compression methods: -lh1-, -lh2-, -lh4-, -lh5-, -lh6-, -lh7-.
limit
Decompression-bomb defenses.
lz4lz4
LZ4 block format with a tiny multi-block framing for streaming.
lz5lz5
LZ5 / Lizard frame-format codec.
lzahlzah
StuffIt classic compression method 5 (“LZAH”): LZSS sliding window over a pre-seeded 4 KiB dictionary, with a single adaptive (sibling- property) Huffman tree for literal/length tokens and a static canonical prefix code for the high bits of each match offset.
lzfselzfse
LZFSE (Apple’s LZ77 + Finite State Entropy) — decoder only.
lzhamlzham
LZHAM (Lossless ZIP Huffman Arithmetic Modeling) — header parser only.
lzmalzma
LZMA (Lempel–Ziv–Markov chain Algorithm).
lzma2lzma2
Raw LZMA2 decoder (7-Zip coder id 21).
lznt1lznt1
LZNT1 — NTFS native file compression.
lzolzo
LZO1X-1 (Lempel–Ziv–Oberhumer) with a tiny multi-block framing for streaming.
lzslzs
Stac LZS (Lempel–Ziv–Stac) — the LZ77 variant specified by RFC 1974 (PPP Stac LZS Compression Protocol).
lzsslzss
LZSS (Storer–Szymanski LZ77 variant) — Okumura’s reference layout.
lzwlzw
Lempel–Ziv–Welch — the Unix compress(1) (.Z) flavour.
lzxamiga_lzx or lzx
LZX (Microsoft CAB / WIM compression).
mtfmtf
Move-To-Front (MTF) transform — a reversible, length-preserving filter.
packbitspackbits
PackBits — Apple’s tag-byte RLE used in TIFF, PSD, BMP, and macOS metadata.
ppmdppmd
PPMd — Dmitry Shkarin’s PPMII variant H, the format used by 7-Zip (method PPMd), RAR3+ (PPM block mode), and ZIP method 98.
qpackqpack
HTTP/3 QPACK header compression — RFC 9204.
quantumquantum
Quantum (Stac, used in older Microsoft CAB files) — decoder only.
rangecoderrangecoder
Adaptive order-0 binary range coder — a standalone entropy codec.
rar1rar1
RAR 1.x (1995-1996) — building-block library, no end-to-end decoder.
rar2rar2
RAR 2.x (1997-2002) — reverse-engineered — decoder-only.
rar3rar3
RAR 3.x (2002-2013) — LZ77 + Huffman path — decoder only.
rar5rar5
RAR 5.x (2013-present) — LZ77/Huffman + new filters — decoder only.
rlerle
Run-length encoding.
rle90rle90
RLE90 — the 0x90/DLE run-length variant shared by ARC method 3 (“packed”) and classic StuffIt method 1.
sit13sit13
StuffIt classic compression method 13 (“LZ+Huffman”).
snappysnappy
Google Snappy — raw block format.
tokio_iotokio
Async tokio::io::AsyncRead / AsyncWrite adapters.
vecalloc
One-shot Vec<u8> compress / decompress helpers.
xpressxpress
Microsoft Xpress — Plain LZ77 byte-aligned codec.
xpress_huffmanxpress_huffman
XPress Huffman ([MS-XCA] §2.1) — Microsoft’s LZ77 + canonical Huffman.
xzxz
xz container around LZMA2.
zip_implodezip_implode
PKZIP Implode (ZIP method 6) — decoder only.
zip_reducezip_reduce
PKZip Reduce (methods 2–5) — decoder only.
zip_shrinkzip_shrink
ZIP method 1 — Shrink: dynamic LZW with a partial-clear marker.
zlibzlib
RFC 1950 zlib container around RFC 1951 deflate.
zstdzstd
Zstandard (RFC 8478) — partial implementation.

Structs§

Progress
Bytes consumed from input and written to output by one codec call.

Enums§

Error
Errors that any algorithm in this crate may return.
Flush
How aggressively Encoder::flush should drain pending encoder state.
Status
Why a codec call returned — the explicit “what should I do next?” signal.

Traits§

Algorithm
A compression algorithm: a name plus encoder/decoder factories plus per-algorithm configuration types.
Decoder
A streaming decompressor.
Encoder
A streaming compressor.