How the files are compressed ?

By | April 29, 2012

 

 

 

Using the file compression is a normal process for our computing needs , whether in the case of data transmission or data storage . Even the layman in computing know how to zip a file and unzip it   . But what happens when you compress a file , how the file size of the original file reduced  and still you can un compress it and restore all the data ?  Hope we can have a basic discussion on it .

 

 

    When I tried to compress my word file , it compresses well and file size reduced to a considerable amount and when I try to compress my jpg file , it does not reduced much and in some cases the size of the  file increased a bit , why it is so ?

hope it is your question .  Why the jpeg file is not responding well to file compression software is because it is already a compressed format. If you try to compress further , actually the size will be increased due to certain overhead associated with it .

Suppose you have a text file with you , and you  found out that the word ” Computer ” is repeated 30 times in that text file . So the  word is redundantly used 29 times . Why can not we use a procedure so that when ever the word Computer is repeated a pointer is used to indicate that this word is a repeating  from the first line of the text .  The example we mentioned is the basic idea behind the  loss-less file compression . ie we will observe a binary string in the file and when ever that string is repeated a pointer is used to mention that this string is used previously , there by saving the space needed to save that bits .  Wen we are uncompressing   the file ,  the reverse process happens and the file will be available intact .

But the case of  your Jpeg file is little bit different. Jpeg is a compressed file format . It uses a  Lossy file compression procedure . ie it compresses a file based on some assumption about the picture details and reducing the unnoticed , unwanted elements to reduce the size . The same thing happens with your mp3 , mp4 formats and many video compression technologies .

 

So a well compressed file  does not have any redundant information on it as  all of them are removed during the process if compression , it does not make sense to  run your compression program again on it .

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *