mac_file_format_docs icon indicating copy to clipboard operation
mac_file_format_docs copied to clipboard

A collection of technical documentation and specifications about Apple- and Mac-related file formats

Mac File Format Docs

A collection of technical documentation and specifications about Apple- and Mac-related file formats, mainly from the classic Mac OS and early Mac OS X era.

If any links on this page are no longer functional, check if they have been archived by the Internet Archive Wayback Machine, or using archive.is aka archive.fo.

License

"Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 International License.

Note: The license only applies to the contents of this repository. All linked external websites and documents are subject to their own copyright notices and license terms.

General information

These resources provide general documentation about the Mac, its internals, and development for the platform. They don't focus on any specific topic.

Non-Mac-specific

These resources are not Mac-specific, but contain some Mac-related information.

  • Wikipedia has articles about many Mac-related topics. The articles themselves usually don't go into deep technical detail, but the references and external links are often worth looking at for more information.

  • The Just Solve the File Format Problem wiki, run by Archive Team, provides information about various file formats. The name might sound like clickbait, but this is a decent site with useful information. As with Wikipedia, the articles often don't go into much detail, but the links are useful for further research.

  • The Kaitai Struct format gallery is a collection of Kaitai Struct specifications for common file formats. The source code for all specs can be found in the kaitai-io/kaitai_struct_formats GitHub repo. These specs can be compiled to many popular programming languages to allow parsing files in the specified format.

  • The Internet Archive (archive.org) has some Mac-related literature, documents and software. Aside from the general search function, the following collections are relevant in particular:

  • bitsavers.org is an archive of documents (and some software) related to technology and computing. The site has no built-in search function, but external search engines can be used. It is also mirrored to archive.org (at least partially), so it can be searched using their search function. The site is organized by topic, so a text search often isn't necessary. The following directories are relevant in particular:

Mac-specific

These resources are specifically about Apple and the Mac.

Inside Macintosh

The Inside Macintosh book series are Apple's official reference material for the classic Macintosh platform. Over time, they have gone through many revisions and updates, and their structure has been changed multiple times.

The Gryphel project (best known for the Mini vMac emulator) has a list of physical book releases of Inside Macintosh (and other Apple developer documentation), including ISBNs, publishers, dates, and Amazon links.

The following is a (likely incomplete) list of the major revisions of Inside Macintosh and where they can be obtained online.

File type and creator codes (file signatures)

  • The chapter "The Finder Interface" in the Inside Macintosh series explains the basic concepts and lists a few standard/system file type codes. This chapter is found in Volume III of the original Inside Macintosh revisions, and in the "Macintosh Toolbox Essentials" volume of the restructured revisions.
  • Apple previously provided a registration service for creator codes to prevent conflicting uses of the same creator codes. This included a lookup form for checking if a creator code is already in use, but there was no public list of all creator codes.
  • The Type/Creator Database (TCDB/TCDBx) is exactly what it sounds like. Notably, it's a downloadable application, not an online service.
  • Indiana University has a very short explanation of type/creator codes.
  • macdisk.com has an explanation page "Signatures of Macintosh Files", including a list of some common type and creator codes.
  • Zeus Productions has a "tech note" explaining how to use type/creator codes in Macromedia Director (I think). It also explains some general concepts and lists common and Director-specific type/creator codes.
  • revolution.byu.edu had a help article "Mac Creator Signature and File Types in Revolution/LiveCode", which also gives a short general explanation, a list of a few common type and creator codes, and some related links.
  • A 2005 post by Henning Ramm on the Pythonmac-SIG mailing list gives some mappings from type/creator codes to file extensions (and vice versa) and short descriptions.

Resource forks

  • The chapter "Resource Manager" in the Inside Macintosh series. This chapter is found in Volume I of the original Inside Macintosh revisions, and in the "More Macintosh Toolbox" volume of the restructured revisions.
  • Wikipedia's resource fork article.
  • The Resource Fork article on the JSTFFP wiki.
  • The KSFL library (and its wiki), written in Java, which supports reading and writing resource files.
  • Alysis Software Corporation's article on resource compression (found on the company's website and in MacTech Magazine's online archive) has some information on the structure of certain kinds of compressed resources.
  • Apple's macOS SDK, which is distributed with Xcode. The latest version of Xcode is available for free from the Mac App Store. Current and previous versions can be downloaded from Apple's developer download section.
  • Apple's MPW (Macintosh Programmer's Workshop) and related developer tools and their documentation. These were previously available from Apple's FTP server.
  • whitefiles.org has a "Resources" page explaining the basics of ResEdit and common system resource types.

AFP (Apple Filing Protocol)

Windows NT Services for Macintosh

AppleSingle and AppleDouble

  • The articles on the JSTFFP wiki about AppleSingle and AppleDouble.

  • The Kaitai Struct spec filesystem/apple_single_double, as found on formats.kaitai.io and in the kaitai_struct_formats repo.

  • Apple's Apple II File Type Notes for AppleSingle (E0 0001) and AppleDouble (E0 0002 and E0 0003), which document version 1 of the format, with a short note about version 2. These notes can be found in many places online:

  • Apple's A/UX Toolbox Macintosh ROM Interface documentation, section 6 "File Systems and File Formats", subsection "AppleSingle and AppleDouble format internals", which documents version 1 of the format.

  • Apple's AppleSingle/AppleDouble Formats for Foreign Files Developer's Note, from 1990, which documents version 2 of the format. A rendered PDF version is available from nulib.com and from kaiser-edv.de (website gone, link via Wayback Machine).

  • RFC 1740 - MIME Encapsulation of Macintosh files - MacMIME, from 1994, describes a later version of the format. (It appears to be equivalent to version 2 described in the previous developer's note.)

  • A number of GitHub projects work with AppleSingle/AppleDouble files in some way and allow reading the format in different languages. In no particular order:

    • https://github.com/AppleCommander/applesingle
    • https://github.com/fthain/applesingle
    • https://github.com/robzed/AppleSingle_Decoder
    • https://github.com/gitpan/Mac-AppleSingleDouble
    • https://github.com/marcust/AppleSingleReader
    • https://github.com/ksherlock/dot_clean
    • https://github.com/rolftimmermans/node-xattr-file
    • https://github.com/MacPaw/XADMaster/blob/master/XADAppleDouble.m
    • https://github.com/MacPaw/XADMaster/blob/master/XADAppleSingleParser.m
    • https://github.com/ParksProjets/Maconv

QTR (QuickTime RezWack)

The QTR (QuickTime RezWack) format was used to add Mac-style resources to Windows files. It was used as part of QTML, the QuickTime Media Layer, which was effectively a partial port of the Macintosh Toolbox and Mac OS to Windows, to allow writing cross-platform QuickTime code that could be used with both Mac and Windows versions of QuickTime.

Disk images

  • The Mac OS X/macOS hdiutil(1) man page. Although naturally it focuses on how to work with disk images and doesn't specify any data formats, it does document lots of random technical details. In particular:
    • Under hdiutil convertis a list of basically all disk image formats and variants that Apple has ever supported.
    • The "compatibility", "history", and "what's new" sections give a pretty complete history of these disk image formats/variants and which system versions support them (or don't).
    • Some older info has been removed from the man page since macOS 11, which removed support for most Classic Mac OS disk image formats.
  • Wikipedia's Apple Disk Image article has some general information, but also documents the basic data structures of UDIF disk images.
  • macdisk.com also documents the basic data structures of UDIF disk images.
  • NewOSXBook.com has a page "Demystifying the DMG File Format", which documents the main UDIF metadata structures.

HFS+ file system compression

  • A Macworld Mac OS X Hints page about HFS+ compression in Mac OS X 10.6. The comments discuss additional tools for examining de-/compressing files compressed with HFS+ compression.
    • One such tool, afsctool, has been developed by brkirch, the author of the above page. brkirch's afsctool homepage still exists (as of 2023-08), but the Google Drive download link isn't publicly accessible anymore. However, a few updated/extended versions of the afsctool source code can be found on GitHub:
      • https://github.com/jrk/afsctool - archived since 2018-01-21
      • https://github.com/RJVB/afsctool - still updated as of 2023 and supports newer macOS versions and compression algorithms like LZVN and LZFSE

Apple Data Compression (ADC)