Data Compression Flashcards
What is lossless compression?
No data is removed when the file is compressed. Used on data that needs to be fully recovered to make sense.
What is lossy compression?
Data is permanently removed when the file is compressed, likely to achieve higher rates of compression.
When is lossy compression used?
Images and audios like .jpg, .mp3. When data loss isn’t completely noticeable.
When is lossless compression used?
RLE on text files. Dictionary encoding on large text files.
What are the benefits of compression?
Storage space - can fit more on the divide, therefore save money.
Bandwidth - reduces the time to download files, reduces data usages.
How is text compressed?
Lossless - Dictionary coding, with a table of contents and a regarding bit value.
Lossy - not appropriate as important data will be deleted, unreadable on the other end.
How are images compressed?
Lossless - RLE for a black and white image, dictionary coding can be used.
Lossy - Adjacent colours are grouped and given a common byte value.
How are audios compressed?
Lossless - RLE used for silence, doesn’t compress much.
Lossy - Removes the sounds the human ear cannot hear. Loud out plays the quiet so the quiet sound gets removed.
How are videos compressed?
Lossless - rare as it doesn’t achieve high enough compression rates.
Lossy - relative (differential) encoding is used and higher compression rates can be achieved.
What is relative (differential) encoding?
Can be lossless or lossy depending on whether the differences between consecutive data units are encoded precisely or approximated.
Only the differences between consecutive data units is transmitted rather than all the units.