Expand description
Shared archive open + extraction logic used by both the CLI (sit verb)
and the GUI archive-browse tab.
Structs§
- Extract
Stats - Result of an extraction run.
Enums§
- Fork
Format - Container format for an extracted file’s forks.
Functions§
- extract_
all - Extract every file in
archivetodest, rebuilding the directory tree.progress(done, total, name)is called before each file entry. - extract_
filtered - Like
extract_allbut only writes entries for whichkeep(idx)returns true (whereidxindexes intoarchive.entries). Folder markers are always written so the rebuilt tree is rooted correctly; file entries the predicate rejects increment neitherfilesnorskippedand don’t show up in the progress callback. Used by the GUI Archives tab’s “Extract Selected…” button (Workflow D.3). - is_
stuffitx - Detect the StuffIt X container (“StuffIt!” / “StuffIt?”). Distinct from StuffIt 5, whose 8th byte is a space (“StuffIt (c)1997…”).
- open
- Read an archive file and parse it, transparently BinHex-decoding a
.sit.hqxwrapper and routing classic StuffIt (SIT!), StuffIt 5, and.seato the right parser. Returns the decoded archive bytes (offsets in the entries are relative to these) plus the parsed directory. - open_
bytes - Like
openbut from in-memory bytes (already-read file contents). Routes throughsuper::detect::detect_mac_archiveso detection is magic-driven rather than extension-driven: a loose.hqxcarrying one Mac file is synthesized into a single-entry archive so the rest of the extract / browse path needs no special case. - write_
entry - Write one extracted file’s forks to the host in the chosen container format.