4.5.6.9 Data compression Flashcards
What is the purpose of compression?
It reduces the size of the file so that the file can be downloaded or streamed faster, and so the file takes up less storage space
What could cause a reduction of sound quality?
The use of compression such as reducing sampling resolution and sampling rate.
What is lossless compression?
A type of compression that doesn’t lose any quality as it uses run length encoding. The original file can be recovered through decompression.
Doesn’t reduce the file size that much
This is generally the technique of choice for text or spreadsheet files, where losing words or financial data could pose a problem.
What is lossy compression?
A type of compression that loses some of the original quality and can’t be recovered. reduces a file by permanently eliminating certain information, especially redundant information
Significantly reduces file size
Lossy compression is generally used for video and sound, where a certain amount of information loss will not be detected by most users.
How does RLE work?
The process involves going through the text and counting the number of
consecutive occurrences of each character (called “a run”). The number of occurrences of the character and the character code are then stored in pairs.
How does dictionary-based compression work?
Uses the dictionary as a simple lookup table
Each word is coded as x/y, where, x gives the page in the dictionary and y gives the number of the word on that page