123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Computers >> View Article

How Does Compression Work?

Profile Picture
By Author: Jack Church
Total Articles: 158
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

Most likely you have been using compression even if you did not realize it. For example when archiving files into a Zip file or when saving digital photos in a compressed JPEG format you are using compression. So how does this compression magic work?

The idea behind data compression is very simple. Data compression converts data from one coding to another. It converts data from an inefficient representation format to a very efficient representation format that requires less storage. In computer words data compression is an algorithmic way to represent the same data in less bits and bytes. Although the concept behind data compression is very simple the implementation can be very complicated and involve sophisticated algorithms and mathematics.

One might wonder why isn't the data always represented in an optimized compressed format? After all if there is a more efficient way to represent data why not always use it? The reason is that there are many domains of efficiency. Data compression optimized file storage space. But when files are compressed it is harder for computer software to process them or in other words ...
... working with compressed files is less efficient in terms of speed. For that reason files are usually compressed for storage purposes and later on uncompressed for processing.

There are two types of data compression known as lossless and lossy. Lossless compression uses inefficiencies in data representation or in other words it removes redundancy in the data to save storage space. For example if a text file includes a long list of the same letter such as a thousand times the letter Z in a row it would require a thousand characters of storage. A data compression algorithm would represent this file in a better way by simply writing something like Write A Thousand Z taking only about 20 characters of storage.

Another example for data compression by removing inefficiency is character encoding. In normal text files each character in the alphabet is represented by one byte or eight bits. In English however not all characters are as likely to appear or in other words not all character are as popular as others. A better way to encode character is to use less bits for the most popular characters and more for the less popular.

Lossy compression on the other hand converts the original data into a more efficient data that is a very close representation of the original data but not exactly the same. In other words as opposed to lossless compression if you convert a file using lossy compression algorithm and then revert it back to the uncompressed format you will not get the exact same data.

So why use lossy compression? Because by allowing the data compression algorithm to create a close enough representation but not exactly the same as the original data file the algorithm can be more efficient and create much smaller compressed files. Lossy compression is commonly used with multimedia files such as photos and videos.

JPEG is a very know lossy compression file format. If you take two photos an original pixel raster raw photo and a JPEG version of the same photo the JPEG version would be extremely smaller than the raw file. If you look at the photos themselves with a viewer the JPEG photo would look the same to the human eye but in reality there will be tiny differences between it and the raw file. In fact once converted to JPEG format it is impossible to recreate the original raw file again. Jack Church explains more on interface command line interface

Total Views: 578Word Count: 589See All articles From Author

Add Comment

Computers Articles

1. Modern Software At Scale: A Practical Guide To Microservice Development
Author: Tech Gazebos

2. The Financial Cost Of Ignoring Computer Repairs: A Westlake Case Study
Author: Arun Singh

3. Cloud Computing Companies In India | Cloud Hosting Service Providers In India | Sathya Technosoft
Author: Sathya Technosoft

4. Embedded Systems Advantages And Disadvantages
Author: Embeddedhash

5. Why Essae Pos Machines Are Ideal For Retail Growth
Author: pbs

6. Best Wordpress Development Companies In India For Business Growth
Author: Web Panel Solutions

7. How Enterprises Leverage It Consulting Companies In The Usa For Cybersecurity
Author: Abiel

8. Cash Drawer Security Tips For Retailers | Prime Poskart
Author: prime poskart

9. Successful Vb6 Migration And Upgrade
Author: Tech Gazebos

10. Soluzioni Complete Per La Stampa In Ufficio: Assistenza, Noleggio E Manutenzione Professionale
Author: Mihai Filip

11. Cheap Vps Hosting & Dedicated Server Solutions – Fast, Secure & Affordable | Rackoona
Author: Rackoona

12. Reliable Temperature Monitoring Solutions Enhancing Drug Safety And Freezer Storage Compliance By Tempgenius
Author: Chris Miller

13. Spark Matrix™: Evaluating Security Information And Event Management (siem) Solutions For Scalable And Intelligent Security Operations
Author: Umangp

14. How To Get In Touch With Bellsouth Customer Service By phone?
Author: frank rayan

15. Bca In Cyber Security Online: Curriculum, Labs, And 2025 Modules
Author: UniversityGuru

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: