GNU/Linux: Preferred compression and archiving formats

People migrating to GNU/Linux usually know about the zip compression and archiving utility. But GNU/Linux support a lot of other compression formats. Let us see what are the different things available.

What is archiving and compression?

Archiving

is a Mechanism to store n number of files in a single file. This is quite useful when you have to transfer/move hundreds of file over the net or you just want to keep them in one single place. The 

Compression

It is s a way to reduce the size of a file i.e the space the file occupies on the disk.  There are different compression utilities and they use different compression algorithms to reduce file size. Different compression give different levels of compression for different file formats.

The tar archiver

The tar utility is primarily a utility to create tape archives, but is still used by GNU/Linux users for creating archives. As per KISS philosophy tar only creates archives and does not do any compression. Though many people confuse that tar does compression, is simply because of the options on the command line which tells tar to call the compression utils gzip or bzip in the background and compress the archive once its is created.

The gzip compression 

Gzip reduces the size of the files using Lempel-Ziv coding (LZ77). The amount of compression obtained depends on the size of the input and pattern of content sub strings. Typically, text in English is reduced by 60-70%.

The bzip compression 

The actual utility is bzip2, it compresses files using the Burrows-Wheeler block sorting text compression algorithm, and Huffman coding. This is better than that achieved by more conventional LZ77/LZ78-based compression algo.  

To gzip or bzip

Where bzip gives better compression in most of the cases there is a trade of in time required to compress the files compared to gzip.  Though this many not be noticeable when the amount is in few megabytes, but the total time required to compress can go upto hours if the contents goes into Giga byte of sizes.

Follow more details in our series of video tutorials over here.


Add new comment

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
CAPTCHA
Enter the characters shown in the image.
Are you a robot?
Address

OpenSourceCook.in
"Natraj"  Bungalow,
Colony No.7,  Sr.No. 38.
(Lane Behind Sai Baba Mandir)
Kale Borate Nagar, Hadapsar,
Pune - 411028.
Get Directions