
Unlike archives, which are just binary blobs, packages can be added to source control, which is the main reason. It is a directory displayed to the user as a single file.

Xcode project files are packages (a macOS concept). Xcode project files also consist of multiple files, but they are not archives. One of the main disadvantages of ZIP, or other binary formats, is its content is inaccessible making it impossible to use with source control. ZIP is easy to use, it’s ubiquitous and fast.
Store pulse archive#
You can think of a ZIP archive as a key/value storage, optimized for the case of write-once/read-many and a relatively small number of distinct keys. Archiving a Pages document makes a lot of sense as it saves a bit of space. When you open a document, Pages unarchives it and puts it in memory. zip and unarchive it (or use unzip from Terminal). In this scenario, I care about space efficiency, but not about incremental updates or atomic writes. But when you are done logging and want to share or archive the logs, I wanted it to create a document that will appear as a single file with a custom extension to be easily shared and opened on another machine. I primarily care about small write performance in this case. While running, it stores all of its files in a plain directory (optimized for writing). What’s the use case? Pulse is a logging system. In this post, I want to share the thought process behind going with ZIP for my specific use case and share some of the implementation details. There are, of course, other options, and the choice largely depends on your requirements. ZIP archives? What’s so interesting about ZIP archives? They appear entirely ordinary but have some characteristics that make them a common choice for some document formats.

One of the potential answers is ZIP archives.

Now, how do you turn a directory into a file? Science! The problem is, you can’t just slap any extension 1 on a directory to turn it into a file, and Pulse store is a directory containing: Registering your custom document type and extension is straightforward: you can follow the official sample.
