FILE COMPRESSION IN LINUX

WHAT IS FILE COMPRESSION?

The files and directories of your computer may be very large some time. Then if you want to transfer it through Internet or any other media, it will take more time or it will require more bandwidth. So, as a solution for this problem we can use file compression. There are two types of file compression techniques used,

  1. lossy compression : Sacrifice unimportant data in the compression process.
  2. lossless compression : Keep all the original data as it is when compressing.

WHAT ARE THE TECHNIQUES?

From this text I hope to talk about 5 broadly used file compression techniques.

  1. tar
  2. zip
  3. gzip
  4. bzip2
  5. xz

For all of those techniques we can talk about the compression and decompression.

HOW tar WORKS?

  • I have created three text documents in my Documents folder.

20.png

  • Now let’s compress them.

21.png

  • Compressed successfully.

22.png

  • Now let’s try decompress it at another location.

23.png

24.png

  • Decompressed successfully.

25

HOW zip WORKS?

  • I have created three text documents in my Documents folder.

20.png

  • Now let’s compress them.

26.png

  • Compressed successfully.

27.png

  • Now let’s try decompress it at another location.

28

29

  • Decompressed successfully.

30.png

HOW gzip WORKS?

  • I have created three text documents in my Documents folder.

20.png

  • Now let’s compress them.

31.png

  • Compressed successfully.

32.png

  • Now let’s try decompress it at another location.

34

33

  • Decompressed successfully.

35.png

HOW bzip2 WORKS?

  • I have created three text documents in my Documents folder.

20.png

  • Now let’s compress them.

40.png

  • Compressed successfully.

41.png

  • Now let’s try decompress it.

43.png

  • Decompressed successfully.

44.png

HOW xz WORKS?

  • I have created three text documents in my Documents folder.

20.png

  • Now let’s compress them.

45.png

  • Compressed successfully.

46.png

  • Now let’s try decompress it.

47.png

  • Decompressed successfully.

48.png

This is how different techniques are used in compression and decompression. Hope you have found this text important and interesting. Thank You!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s