Compressing an archive

An archive can be quite large—especially if you archive the entire partition. To conserve space, you can compress archives, although it takes some time to compress on storage and decompress on retrieval.

Neutrino includes the following compressors and decompressors:

The best choice is usually gzip, because it's supported on many operating systems, while freeze is used mainly for compatibility with QNX 4 systems. There are also many third-party compressors.

Note: The gzip utility is licensed under the Gnu Public License (GPL), which is a consideration if you're going to distribute gzip to others as part of the backup solution you're developing.

For example, to compress my_archive.tar to create a new file called my_archive.tar.gz, type:

gzip my_archive.tar

This file is much smaller than the original one, which makes it easier to store. Some of the utilities—including gzip—have options that let you control the amount of compression. Generally, the better the compression, the longer it takes to do.

Note: The default extension is .tar.gz, but you'll see others, such as .tgz. You can use the -S option to gzip to specify the suffix.