kcw | journal | 2000 << Previous Page | Next Page >>

Here's a cool utility that I found, MacGzip. Compression programs have been around for a long time, and on the Macintosh platform there has been Stuffit plus a few other programs that have come and gone. I remeber back when I had my IIsi back in '93, the two big ones were Stuffit and Compactor. Stuffit then went the commercial route, with a shareware version. Compator became Compact Pro, but it eventually died off as Stuffit has become the predominant archive format on the Mac. Other archivers based on Zip, GnuZip, Arc and other Unix or DOS programs haven't really taken hold.

The biggest problem with those programs are that they don't handle resource forks well, or at all really. Zip up a Word file or a Pict file and it's fine, you can unzip it and still access it. Try to zip up a program or a SimpleText file with embedded pictures and you'll lose information, if you get anything coherent back at all. That's because the programs only compress one file, and that Macintosh files are really composed of two files, or forks: the resource fork and the data fork. As a convention, most of the programs save the data fork and drop the resource fork, which for most files only contains the owner info and icon, nothing important to the file itself.

As a consequence I've never really used those programs since it's annoying to unzip a file and not have an icon with it. It's gotten slightly better with OS 8.6 because the OS can open up a program to view a file based on the file's extension. Still, there's no hope for compressing seldom used programs or other files with a significant resource fork.

Enter MacGzip which has an elegant solution to the problem. It converts files to MacBinary before compressing. MacBinary is a way to code a two-part Macintosh file into one file, suitable for storing on a non-Macintosh machine. It also maintains type and owner information, so when you restore the file it'll have the appropriate icon. It's not an archiver though: it can't compress several files into one file, it compresses each file in place. Also, uncompressing the file on a non-Macintosh computer will just leave you with a MacBinary file, which then has to be converted to a data file, an extra step for cross-platform compatibility.

I've used it to compress some big Word files which I sort of need to keep around but don't look at every day. It's amazing how big a Word file can get once it has some embedded pictures. 50 MB Word file compresses to less than 2 MB, showing once again that Microsoft does not care about efficiency. But other than that there is less use for a compression program. Most of my data files are JPEGs and MP3s, which are already compressed. The text files that I have aren't for the most part big enough to bother with compression.

Which leads me to another question: when do you compress/archive files versus just getting a bigger hard drive? My policy for a couple of years had been to buy bigger hard drives when I ran out of space. That changed when I got my PowerBook since if I replace the hard drive I don't have a use for the old drive since it's not SCSI. I've been carefully making sure I don't run out of space, and keep a healty amount of scratch space for work. Now that I'm getting a bigger hard drive my brief use of MacGzip will probably stop. But I think it's interesting to see that someone has created a version of Gzip that can store Macintosh files correctly.

Copyright (c) 2000 Kevin C. Wong
Page Created: August 17, 2004
Page Last Updated: August 17, 2004