/mac_file_format_docs

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

Creative Commons Attribution 4.0 InternationalCC-BY-4.0

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)

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

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.

Classic Mac OS installer tomes

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 convert is 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.
  • Mothers Ruin Software has some documentation about the UDIF trailer metadata structure, assembled from various sources and their own reverse-engineering work.

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:

Apple Data Compression (ADC)

Apple Archives (.aar, .yaa)

A proprietary archive format supporting various compression algorithms and extensible metadata. Officially introduced with macOS 11 via the Apple Archive framework and the aa command line tool. It evolved from the earlier YAA format, which was already supported since macOS 10.13 via the yaa command line tool, but not well-documented or advertised by Apple. Apple's own Apple Archive tools and libraries seem to be backwards compatible with the earlier YAA format. The macOS Archive Utility has supported extracting YAA and Apple Archives since their respective introduction, but supports creating Apple Archives only since macOS 12.

  • The "Unpacking Apple Archives" thread on the Apple Developer Forums explains the use of Apple Archives (and formerly YAA archives) inside XIP archives.
  • A blog post by Nightwatch Cybersecurity from 2020 (before the official introduction as Apple Archive) discusses the possible use of YAA archives by malware.
  • Howard Oakley's blog, The Eclectic Light Company, has multiple blog posts about Apple Archives.
  • An issue on the issue tracker for the Keka archive manager discusses supporting Apple Archive and YAA archives.
  • The Apple Wiki has an Apple Archive page with some technical details about the data format.
  • libNeoAppleArchive is an open-source, MIT-licensed "unfinished cross-compat library for parsing Apple Archive (and, by extension, YAA)".

Apple Encrypted Archives (.aea)

Another proprietary format, built on top of the Apple Archive format, which adds the ability to encrypt and/or sign archives.

UIKit NIB archives (.nib files with NIBArchive signature)