File Compression Guide
This guide shows what file compression (packing) is and how to apply it with the popular ZIP and RAR formats. The packer tool which is used here is WinRAR 3.x. It provides full support for both RAR and ZIP and can read a lot of other packer formats.
 
The principle of File Compression:
The bigger a file is the bigger is the space it consumes on a mass storage media (e.g. hard disk). And the bigger the file is the more time and bandwidth is required to transfer it over a network (LAN, Internet,...). Several techniques to reduce the file size were conceived, these methods are called compression.
One discerns between two categories of compression:
  • Lossless compression - The content of the file doesn't lose information during the compression process. For example: A text or program file which is changed during the compression is destroyed and useless after the decompression. It must be an exact binary image. The compression ratios are rather low with this method.
  • Lossy compression - Loss of content is allowed. This works for certain file types only (e.g. Video, Audio or picture file). For example: During a MP3 compression of a sound file those parts are removed which the listener wouldn't notice anyway. The result of a lossy compression is not an exact binary image. The possible compression ratios are very high.
So called packer formats (ZIP, RAR, ACE, ARJ,...) belong to the category lossless compression. They are able to compress any content without losing any data.
 
Numerous compression algorithms are available. To give an impression on how lossless compression works, we describe exemplary the RLE algorithm here:
RLE (Run Length Encoding) is an algorithm to replace a sequence of equal data units by a control sequence.
Example: This character string shall be compressed with RLE: ABBBBBBBBBCCCCCCCD (size = 18 bytes)
The result of the RLE compression: A%8B%7CD (size = 8 bytes, compression ratio = 44 percent)
The %8B means 'Print 8 times a B' and %7C means 'print 7 times a C'.
During the decompression the original character string is recovered again.
 
 
WinRAR 3.x - Overview:
WinRAR 3.x is a commercial tool to handle many packer formats. It is able to read/write RAR and ZIP formats and additionally reads CAB (Microsoft's Cabinet), ARJ, LZH, ACE, TAR and GZ (UNIX), UUE, BZ2, JAR and ISO.
Due to the seamless integration to the Windows shell, it's very easy to use. Many useful features are available: Multi-part archiving, content encryption,... WinRAR is virtually a 'swiss-army-knife' for compressing and handling files. We recommend to use WinRAR 3.0 or higher, it is downward compatible to older versions.
 
 
WinRAR 3.x - Installation:
Install WinRAR 3.x on your system.
 
Select the packer formats which should be associated with WinRAR.
 
 
 
Creating a RAR archive:
To create a RAR archive select the files/folders to add, right-click and choose Add to archive.
 
Select Archive format RAR and press OK.
 
The archive with the extension .rar is created. Watch the filesizes, the size of the archive is only 50% of the original file.
 
 
Unpacking a RAR archive:
To unpack a RAR archive right-click and choose Extract here.
 
The content of the archive is recovered now.
 
 
Creating a ZIP archive:
To create a ZIP archive select the files/folders to add, right-click and choose Add to archive.
 
Select Archive format ZIP and press OK.
 
The archive with the extension .zip is created. Watch the filesizes, the size of the archive is only 54% of the original file.
 
 
Unpacking a ZIP archive:
To unpack a ZIP archive right-click and choose Extract here
 
The content of the archive is recovered now.
 
 
Creating a multi-part RAR archive:
WinRAR is able to split the archive file to multiple parts. No separate file splitter is required (e.g. MasterSplitter or HjSplit).
To create a multi-part RAR archive select the files/folders to add, right-click and choose Add to archive.
 
Select Archive format RAR, adjust Split to volumes (250k means 250 kbytes) and press OK.
 
The multi-part RAR archive is created now. test.part1.rar is the first and test.part3.rar is the last part.
 
 
Unpacking a multi-part RAR archive:
The set of the multi-part RAR archive must be complete in order to unpack the content properly. Older versions of RAR (2.x and lower) using another part naming (*.rar, *.r00, *.r01, *.r02,...). WinRAR 3.x can read older files too.
To unpack a muli-part RAR archive right-click on the first file of the set (*.part1.rar or *.rar for older RAR versions) and choose Extract here.
 
The content of the archive is recovered now.
 
 
Creating a pass-protected RAR/ZIP archive:
The RAR and ZIP format allows to encrypt the content of the archive. Only with the correct password it is possible to recover the content. The strength of the RAR/ZIP encryption is quite decent, but by far not as secure as some other available encryption algorithms (IDEA (e.g. used in PGP), Blowfish (e.g. used in Kremlin), AES (e.g. used in Steganos Security Suite,...). Due to the unprotected directory structure of RAR/ZIP a so called Plain Text Attack is possible. If an a attacker has at least one of the archive files in an unencrypted format, he is able to 'crack' the pass-protected archive within several minutes (e.g. with the tool Advanced ZIP/RAR Password Recovery). RAR 3.x encrypts the file names in the directory (optional) and so is resistant against a Plain Text Attack.
To create a pass-protected archive select the files/folders to add, right-click and choose Add to archive.
 
Select Archive format (RAR or ZIP and click on the Advanced tab.
 
Press Set password.
 
Enter the password you want to use. Encrypt file names is not available in the ZIP format. Press OK.
 
Press OK to start the archiving/encryption process.
 
The encrypted archive is created now.
 
 
Unpacking a pass-protected RAR/ZIP archive:
Unpacking of an pass-protected (encrypted) archive is possible with the correct password only.
To unpack a pass-protected RAR/ZIP archive right-click and choose Extract here.
 
Enter the password.
 
The content of the encrypted archive is recovered now.
 
 
Сайт создан в системе uCoz
<noembed>