OS X adds XZ support

I stumbled upon a pleasant new feature for those who like their downloads compact and fast. The built‐in Archive Utility on Mac OS X 10.10 “Yosemite” now supports uncompressing/extracting from the highly efficient XZ compression format.

file icon image of OS X’s TXZ file icon

OS X’s new TXZ file icon

Archive Utility is the small program that opens when users compress or uncompress files in OS X. Its interface is seen as a small window showing the overall progress of the operation. XZ files can now be opened effortlessly by double‐clicking on downloaded XZ files.

XZ is a file format that uses the highly efficient LZMA compression algorithm. On most files, it will produce files that are much smaller than those of the venerable ZIP format.

Archive Utility have added support for the file extensions .xz for XZ files, and .txz and .tar.xz for TAR archives compressed in an XZ file. XZ only supports a single file so another format, like TAR, must be used to create an archive to contain multiple files in one compressed file.

There is no way to create XZ files from the graphical user interface. Neither is XZ Utils included for use in the command line. XZ Utils can, however, be installed using homebrew for anyone wanting to distribute software or other files in XZ files. Without installing anything, a TAR archive can be created with XZ compression using the tar program with the undocumented --xz argument.

Update 1

It turns out the XZ support in OS X 10.10 is kind of broken. Single‐file XZ file streams like those created by XZ Utils, 7zip, and other popular compression utilities are entirely unsupported.

Only XZ files containing a TAR archive are supported. OS X insist that there must be a TAR archive inside XZ files or it will choke on it. A TAR archive can contain a single file, so that can be used to work around the issue for compressing individual files.

1 thought on “OS X adds XZ support”

Leave a Reply

Your email address will not be published. Be courteous and on-topic. Comments are moderated prior to publication.