thecloudexpanse/sit: Create StuffIt archives on Unix systems

Create stuffit archive on Unix system

Summary

sit is a command-line tool that can create compressed StuffIt 1.5.1-compliant archives. An archive can contain both files and folders. Resource forks and metadata are preserved, and the resulting archive file can be extracted with Stuff It or Stuff It Expander on classic Mac OS systems, as well as The Unarchiver on modern systems. Run the tool in a terminal without any arguments to see its options.

Introduction

sit The program was originally written in 1988 and posted to Usenet’s comp.sources.mac newsgroup by Tom Bereiter. The program assumed it was running on a Unix system where each input file either contained no resource information, or was split into 3 binary files named .data, .rsrc, and .info extensions.

This modern update of sit Takes into account the fact that macOS is a Unix system since 2001, and input files may contain native resource forks. The program has been extended to accept files or directories as input, and will store the contents of the directories recursively. Its primary purpose is to create a portable container that can be safely transferred from a modern system to a classic Mac computer or emulator.

Use

sit [-v] [-u] [-T type] [-C creator] [-o dstfile] file ...

Creates a StuffIt 1.5.1-compliant archive from one or more files (or folders) specified as arguments. Combinations of files and folders can be specified. If the default output file is “archive.sit” -o Option not provided. Use -v, -vvOr -vvv To quickly view verbose output.

Files without a resource fork are assigned the default type TEXT and manufacturer KAHLRecognize them as text files created by ThinkC. You can override the default type and creator -T And -C Option.

-u The option converts all linefeeds ('\n') to carry returns ('\r') in the data fork of the file. This is really only useful when storing plain Unix text files that you want to open in a classic Mac application like SimpleText or MacWrite. In general, you should avoid this option, especially if you are storing other types of documents or applications.

Example

# create "archive.sit" containing three specified files
sit file1 file2 file3

# create "FolderArchive.sit" containing FolderToBeArchived
sit -o FolderArchive.sit FolderToBeArchived

# specify that untyped files are JPEG and open in GraphicConverter
sit -o jpgArchive.sit -T JPEG -C GKON *.jpg

building

Create tool by simply typing make Whereas sit is the current directory.

It should be built cleanly on any Unix system with developer tools installed. On macOS, you may be asked to install Xcode’s CLTools support when you first try to run make,

boundaries

Unlike StuffIt, this program does not currently offer a choice of compression algorithm to use. LZW is supported and used by default to compress archives. While LZW compression offers significant savings, Huffman compression was also supported by StuffIt 1.5.1, and may offer additional savings for some files. The possibility of adding Huffman encoding is being investigated for a future update.

This program is known to compile and run on macOS systems (Snow Leopard 10.6 or later). Although it is intended that the software should be able to compile and run on any UNIX system, it currently cannot properly obtain file creation dates on some systems whose stat The structure does not contain a st_birthtime Field, because it is not part of the POSIX standard yet.

This software may contain bugs. Use at your own risk.

Linux and cross-platform support

This version of sit It has been extended to work on Linux and other Unix systems. On non-MacOS platforms, both resource forks and file metadata can be provided using the AppleDouble file format. ._filename Or .rsrc Sidecar. They can also be made available .rsrc And .info Files that are output by xbin Program.


Filter and reassemble binhex files from Usenet

macbinfilt A companion utility for processing Mac binary files posted to Usenet newsgroups, specifically comp.binaries.mac. In the 1980s and 1990s, Mac software was commonly distributed via Usenet in the Binhex 4.0 format, often divided into multiple article parts.

What it does:

  • Filters Usenet article text to extract binhex-encoded data
  • Automatically reorders multi-part articles if parts fall out of order
  • Removes irrelevant headers, signatures and non-BinHex content
  • Output cleans binhex data ready for decoding xbin or similar equipment

Use:

# Process a single article or file
macbinfilt article.txt > output.hqx

# Process multiple parts (will reorder automatically)
macbinfilt part1.txt part3.txt part2.txt > complete.hqx

# Process from stdin (e.g., from a newsreader)
cat article.txt | macbinfilt > output.hqx

When to use it:

  • You are working with Usenet’s Historical Mac Software Archives
  • You need to extract binhex data from articles with headers and footers
  • You received multi-part articles out of order and need to recombine them
  • You are processing comp.binaries.mac archive

notes:

  • macbinfilt Looks for lines containing the text “Part N of M” to identify multi-part files
  • Missing parts will be reported as errors
  • The output always starts with the binhex signature: (This file must be converted with BinHex 4.0)
  • The filtered output can be decoded using binhex decoders xbin



<a href

Leave a Comment