Expand description
Native readers for classic Macintosh archive formats.
These archives are trees of Mac files, each preserving a data fork, a resource fork, and Finder info (type/creator/flags). The reader exposes entries that map cleanly onto the rest of rusty-backup’s fork-aware tooling (BinHex export, MacBinary, HFS import).
stuffit— classic StuffIt (.sit,SIT!magic) and StuffIt self-extracting archives (.sea).compactpro— Compact Pro (.cpt, and.seaself-extracting), commonly distributed BinHex-wrapped.mar— Hampa Hug’smararchive (.mar): a single Mac file or folder tree, read + written (stored).
See docs/native_mac_archives.md in rusty-backup for the format references and roadmap.
Licensing is per file (each starts with an SPDX line): the StuffIt / Compact Pro
decompressors and parsers ported from XADMaster are LGPL-2.1-or-later, everything else is
MIT. See THIRD_PARTY_NOTICES.md.
Modules§
- bitreader_
be - Big-endian (MSB-first) bit reader shared by the StuffIt Huffman (method 3)
and LZAH (method 5) codecs. Matches XADMaster’s
CSInputNextBit/CSInputNextBitString(the non-LEvariants). - compactpro
- Compact Pro (
.cpt) archive reader — Bill Goodman’s Compactor / Compact Pro format, common for vintage Mac software and frequently distributed as a BinHex-wrapped self-extracting archive (.sea.hqx). - detect
- Magic-sniff classifier for Mac archive bytes. Returns a single
MacArchiveKindregardless of filename extension, so the GUI workflows in OPEN-WORK §6.1 can trigger off the actual file content rather than a possibly-misleading name. - extract
- Shared archive open + extraction logic used by both the CLI (
sitverb) and the GUI archive-browse tab. - macbinary
- MacBinary I / II / III — the canonical full-fidelity parser for the family.
- maczip
- MacZip — Info-ZIP’s Macintosh port (D. Haase), the “new”
Mac3format. - mar
- MAR archive reader + writer (classic Mac, Hampa Hug’s
martool). - stuffit
- Classic StuffIt (
.sit) + StuffIt self-extracting (.sea) reader. - stuffit5
- StuffIt 5 (
.sitv5, magic “StuffIt (c)1997…”) container reader. - stuffit13_
tables - Static Huffman length tables for StuffIt method 13 (selectors 1-5).
Auto-generated from XADMaster
XADStuffIt13Handle.m; do not edit by hand. - stuffit_
arsenic - StuffIt compression method 15 (“Arsenic”): an arithmetic-coded BWT + MTF + RLE scheme (conceptually similar to bzip2). Used by StuffIt’s “maximum” setting and by most StuffIt 5 archives.
- stuffit_
huffman - StuffIt compression method 3 (“Huffman”): a plain byte-wise Huffman
code whose tree is serialized at the head of the stream. Ported from
XADMaster
XADStuffItHuffmanHandle.m. Big-endian (MSB-first) bitstream. - stuffit_
lzah - StuffIt compression method 5 (“LZAH”): an LHArc-style LZSS over a 4 KiB
preset window, with an adaptive (FGK) Huffman code for literals/lengths
and a static prefix code for the high bits of the match offset. Ported from
XADMaster
XADLZHDynamicHandle.m(+XADLZSSHandle.m). Big-endian bitstream. - stuffit_
lzh - StuffIt compression method 13 (“LZ+Huffman”): an LZSS scheme with
per-block Huffman-coded literals/lengths/offsets. This is the dominant
codec in classic
.sitarchives. - stuffit_
lzw - StuffIt compression method 2 (“Compress”): the classic Unix
compress(1)LZW with block mode (code 256 = table clear). StuffIt invokes it with flags0x8e→ block mode, 14-bit maximum code width.