NOTE:
The NAS website is no longer being updated. The information on this page may be out of date and/or incorrect.

For more current information on this page's topics, see:

Introduction to File

Compression/Decompression

 

I. Why Compress Files?

Files available for transfer from one host to another over a network (or via modem) are often stored in a compressed format or some other special format well-suited to the storage medium and/or transfer method. There are many reasons for compressing/archiving files. The more common are:

1.Many compression/archiving utilities allow two or more related files to be combined into a single file. This makes it possible to transfer multiple files with a single command. For example, the Clarkson Telnet/TN3270 (CUTCP) package consists of over 20 files. These are all combined into a single file called cutcp-b.zip so that you don't have to transfer them individually by name.

2.File compression can significantly reduce the size of a file (or group of files). Smaller files take up less storage space on the host and less time to transfer over the network, saving both time and money.

3.Some archive formats (e.g. uuencode, BinHex) are used to convert binary files to an encoded format using only ASCII characters. This makes it possible to transfer binary files via electronic mail or another transport method that does not ordinarily support binary data.

II. Recognizing File Types by Name

Many file archive/compression formats were originally platform- specific and continue to be associated with a particular computer platform or operating system. It is, thus, often possible to determine the intended platform for a particular file simply by looking at its name and, in particular, its extension. The list below summarizes some of the more common file extensions you will encounter when using ftp and the type of computer and operating system with which they are typically associated.

Extension           Platform/OS (Compression Format Name)

.arc                PC/DOS (ARC/PKPAK)

.cpt                Mac (Compactor, Compactor Pro)

.dd                 Mac (Disk Doubler)

.exe                PC/DOS (Self-extracting archive; the file
                    itself should be executed and it will
                    automatically decompress into one or multiple
                    files.  Also used for executable PC program
                    code that decompresses in memory upon
                    execution.)

.hqx                Mac (BinHex; encodes binary or text files
                    into a special format using only ASCII
                    characters.  Files are often compressed and
                    then BinHexed, so it is not uncommon to see
                    multi-part extensions like .cpt.hqx or
                    sit.hqx.  Always unBinHex the file before
                    decompressing it.)

.lzh                PC/DOS (LHA, LHarc)


.lzs                PC/DOS (Larc)

.lzw                PC/DOS (LHWarp)

.pak                PC/DOS (PAK)

.sea                Mac (self-extracting archive)

.shar               UNIX (shell archive)

.sit                Mac (StuffIt)

.tar                UNIX (tar)

.tar.Z              UNIX (Compressed tar archive)

.uue                UNIX (uuencode, encodes binary or text files
                    into a special format using only ASCII
                    characters)

.Z                  UNIX (Compress)

.zip                PC/DOS (PKZIP)

.zoo                PC/DOS (Zoo)

Although certain compression formats are normally associated with a particular platform or operating system, today many common compression formats are supported on multiple platforms. In other words, although ZIPped files are typically created by and for PC/DOS machines, there are ZIP/UNZIP utilities for almost every well-known platform. When using such utilities, rembember that while you may be able to decompress a file on a computer other than its native platform, you may not be able to use it. It all depends on what's inside the archive. For example, once decompressed, an ASCII or postscript file can be used on many different platforms. However, application programs written for PC/DOS computers or Macs will only run on those machines, even though it is possible to decompress them on other types of computers.

 


NASH Table of Contents