Format:StuffIt
| On this wiki | Facts · Code · Notes · Topics |
|---|
Aladdin/Smith Micro StuffIt, the dominant classic Mac archive format (.sit, .sea self-extracting): the original format starts "SIT!" with "rLau" at offset 10, StuffIt 5 starts with the text "StuffIt (c)1997-"; entries hold separate data and resource fork compression methods.
Overview
StuffIt archives hold classic Mac files with both forks, Finder type and creator, and per-fork compression. They usually travel inside Format:MacBinary or Format:BinHex 4.0. See Platform:Classic Mac OS. This page is at recognition level.
Recognition (original format, StuffIt 1.x-4.x)
From XADMaster XADStuffItParser.m (LGPL-2.1, lines 41-56): the u32 at offset 10 is 0x724C6175 ("rLau") and the u32 at offset 0 is 0x53495421 ("SIT!"). The parser also accepts installer archive variants where the first bytes are 'S','T' followed by 'i' and 'n' or a digit, or by two digits.
Entry header (112 bytes, SIT_FILEHDRSIZE, lines 62-98): byte 0 resource fork method, byte 1 data fork method, byte 2 name length, 31 bytes of name from 3, u16 name CRC at 34, then file type at 66, creator at 70, Finder flags at 74, creation date at 76, modification date at 80, resource length at 84, data length at 88, compressed resource length at 92, compressed data length at 96, resource CRC at 100, data CRC at 102, header CRC at 110 (CRC-16 over bytes 0-109, polynomial 0xA001 form, line 137). Directories use method values 0x20 (start) and 0x21 (end); bit 0x80 means password protected and 0x10 means the folder contains encrypted items.
Compression method is the low 4 bits (names at lines 277-290): 0 none, 1 RLE, 2 Compress (LZW), 3 Huffman, 5 LZAH, 6 fixed Huffman, 8 MW, 13 LZ+Huffman, 14 Installer, 15 Arsenic. The parser decodes 0-3, 8, 13, 14 and 15 (the LZAH case is commented out).
StuffIt 5
From XADStuffIt5Parser.m (lines 36-56, 130-148): the file starts with the text "StuffIt (c)1997-" then four wildcard bytes (the end year), then " Aladdin Systems, Inc., http://www.aladdinsys.com/StuffIt/" and CR LF; the recognizer needs at least 100 bytes. At offset 82 a version byte (5) and a flags byte follow, then u32 total size, u32, u16 number of root entries, u32 offset of the first entry, u16 CRC. Entry headers begin with the magic 0xA5A5A5A5 (SIT5_ID). Flag bits: archive 0x10 (14 extra bytes), 0x20, 0x40, 0x80 (encrypted); entry 0x40 directory, 0x20 encrypted, 0x10 resource fork.
StuffIt X
Unverified: StuffIt X archives (.sitx) start with "StuffIt!" or "StuffIt?"; not read in a source.
Code & repositories
- https://github.com/MacPaw/XADMaster @
7cb9ee0abbb163f261e4cb74501e15067032319c· license: LGPL-2.1
The Unarchiver's engine (Objective-C, LGPL-2.1): recognisers and parsers for MacBinary, AppleSingle/Double, BinHex and StuffIt 1-5.
Tested on: source read, not run: read the source only · checked 2026-10-19; last activity 2026-09-21