4.5.6 Representing images, sound and other data Flashcards
Why may files be compressed?
Files may be compressed to reduce their size.
What is an advantage of smaller files?
• Smaller files may be transferred faster between storage devices or over the internet.
What are the two kinds of compression?
- Lossy
* Lossless
What kinds of files are compressed?
- Images
- Sound files
- Text files
What happens to the information with lossy compression?
• Some information is lost in the process of reducing the file’s size.
What occurs in lossy compression?
- Some information is lost in the processing of reducing a file’s size
- This could be reducing the resolution of an image or lowering the sample resolution of a sampled audio file.
What is an advantage of lossless compression?
There is no loss of information when using lossless compression, the size of a file can be reduced without decreasing its quality.
What are the two methods of lossless compression?:
- Run length encoding
* Dictionary based
How does RLE work?
Reduces the size of a file by removing repeated information and replacing it with one occurrence of the repeated information followed by the number of times it is to be repeated
Why may RLE not be suitable?
where information has no repeated values, it cannot be compressed by RLE.
Not all data is suitable for compression by RLE.
How does dictionary based methods work?
• When a file is compressed with a dictionary based method, a dictionary containing repeated data is appended to the file.
How is file size affected by dictionary based methods?
• Results in a reduction in size, however the dictionary has to be present in the file in order for the files to be reproduced, resulting in the file size increasing.
What are RLE and dictionary based methods most effective on?
Files that contain a lot of repeated data.
What is the advantage of lossy compression?
• Extent to which file size can be reduced is not limited.
What are the disadvantages of lossy compression?
- Quality of file is reduced
* Some information is lost in the compression process.