Data Compression. What is Data Compression?. Wisegeek.com defines Data Compression as:
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
“Data compression is a general term for a group of technologies that encode large files in order to shrink them down in size. The purpose is two-fold. Smaller files take up less room, leaving more storage real-estate. Also, smaller files are faster to transfer over a network, whether that network is the Internet, an intranet, or a local area network (LAN).”
Make Data smaller using pattern recognizing algorithms
Types of Data Compressions
Lossless Data Compression
Lossy Data Compression
Definition from WiseGeek.com:
a compression technique that does not lose any data in the compression process.
In other words, the compression program will compress the file and when the file is re-opened it will be completely like the original
Taken from Article By Tom Harris-
Quote from John F. Kennedy’s Inauguration Speech:
"Ask not what your country can do for you -- ask what you can do for your country."
The following words appear twice: ask, what, your, country, can, do, for, you
Make a key for the repeated words:
Ignoring whether the word starts with a capital letter and using the key:
"1 not 2 3 4 5 6 7 8 -- 1 2 8 5 6 7 3 4“
How much data was saved?
Assume each character and space takes 1 unit of memory then the original line takes 79 units and the new one takes 37 for the key and 37 for the coded line so a total of 74 units.
Only a difference of 5 units of memory
Only a single line was converted using that key so over the whole document would decrease the file size by a good amount.
Is this the only way to build key?
Explanation of Lossy Compression from the wise geeks:
a type of data compression in which actual information is lost. This means that after reconstructing the data from the information available, one winds up with something less than was in the original file. Generally, the goal is to use lossy compression such that there is not much observable loss in the final product.
Compresses more than the lossless compression algorithms
Decreases size of pictures through manipulation of pixels
Keeps the image the same to the human eye since the human eye cant distinct slight changes made to pixel values
Picks a color that matches a whole section of a picture and changes the pixel value to the color that takes least space
A video is nothing more then a bunch of pictures going one after the other at a certain rate
Imagine a post it pack
Put a picture on each page then flip through it
Same thing with video
For this reason video can be compressed way in the same way a picture can by breaking down the video into each frame.
So a CD stores a huge number of bits for each second of music:
44,100 samples/second * 16 bits/sample * 2 channels = 1,411,200 bits per second
If an average song is three minutes long, then the average song on a CD consumes about 32 million bytes (or 32 megabytes) of space
MP3 compression is used to reduce this by a factor of 10 – 14 times without noticing the sound change
Things about sound:
There are certain sounds that the human ear cannot hear.
There are certain sounds that the human ear hears much better than others.
If there are two sounds playing simultaneously, we hear the louder one but cannot hear the softer one.
Taking sounds out that the user will not even notice will cause the song to decrease in size by a factor of ten or more