pub enum MacArchiveKind {
BinHexSingleFile,
BinHexOverSit,
BinHexOverSea,
Sit,
Sit5,
Sea,
CompactPro,
BinHexOverCompactPro,
Mar,
MacBinary,
MacZip,
}Expand description
What kind of Mac archive a byte buffer is, if any.
Variants§
BinHexSingleFile
A .hqx whose decoded payload is one Mac file (not a SIT/SEA).
Carries data fork + resource fork + Finder info (type, creator,
flags). The Workflow A modal asks the user whether to “Convert
to binary” (decode the HQX and add the inner file) or add as-is.
BinHexOverSit
A .sit.hqx: BinHex-wrapped classic StuffIt or StuffIt 5
archive. The Workflow A modal offers three actions (convert and
expand / convert only / add as-is).
BinHexOverSea
A .sea.hqx: BinHex-wrapped self-extracting StuffIt archive.
Same three-action shape as [BinHexOverSit].
Sit
A classic StuffIt archive (SIT! magic).
Sit5
A StuffIt 5 archive.
Sea
A self-extracting StuffIt archive: a Mac application carrying a SIT! signature inside its data fork.
CompactPro
A Compact Pro archive (.cpt, or a .sea self-extracting one). The
0x01 marker plus a CRC-validated index identify it.
BinHexOverCompactPro
A .cpt.hqx / .sea.hqx: BinHex-wrapped Compact Pro archive.
Mar
A mar archive (.mar, MAR\x80 magic) — a single Mac file or folder
tree. Only the stored (unwrapped) form is recognized here.
MacBinary
A MacBinary I/II/III file (.bin): a transport wrapper holding one Mac
file’s two forks plus Finder info. Content-detected (it has no reliable
extension), so a raw .bin disk image stays a disk image.
MacZip
A MacZip archive (.zip): Info-ZIP’s Macintosh port stores each Mac
file’s data fork as a normal ZIP entry and its resource fork under a
XtraStuf.mac/ component, with Finder info in a Mac3 extra field.
Content-detected (presence of a Mac3 field), so a plain
disk-image-in-a-zip stays a disk image.
Implementations§
Source§impl MacArchiveKind
impl MacArchiveKind
Sourcepub fn label(self) -> &'static str
pub fn label(self) -> &'static str
Short label suitable for log messages and dialog titles (“BinHex 4.0”, “StuffIt”, “StuffIt 5”, “SEA”, “StuffIt-over-BinHex”, “SEA-over-BinHex”).
Sourcepub fn is_binhex_wrapped(self) -> bool
pub fn is_binhex_wrapped(self) -> bool
True iff the kind has a BinHex outer wrapper (i.e. would benefit from a “Convert” action that strips the wrapper).
Sourcepub fn is_multi_file(self) -> bool
pub fn is_multi_file(self) -> bool
True iff the kind has a multi-file archive payload (SIT / SIT5 /
SEA, possibly wrapped in BinHex). The opposite case is a
BinHexSingleFile, which only ever holds one file.