1.3.1 Flashcards
What is dictionary encoding?
Ideal for compression of text
Creates a table of entries (patterns of text) and assigns them a code/reference/number
Only codes included in file when compressed
Dictionary has to be included in compressed file but overall size reduction is significant
Missed
What is purpose of compression?
Reduce size of files
Reduce download time
Reduce storage requirements
Make best use of bandwidth
When do we use compression?
Mobile networks limitations (not everyone has 5G etc)
Web pages
Music and video buffering (compressing data will not affect result of this)
Use it when storing, sharing, transmitting data
Why?
Critical to make efficient use of bandwidth given vast amounts of data sent + streamed over internet every day
Reducing file sizes speeds up time taken to transmit
What does the level and methods of compression we carry out depend on?
Aim of compression is to reduce size of file - use lossy of lossless
Depends on:
Type of file
Level of quality wish to retain
Speed of transmission required
Quality vs usability decisions
What is lossy compression method?
Some info present in original file is permanently discarded + cannot be restored
Algorithm designed to minimise impact if permanent loss by eliminating data that’s less likely to be noticed by human perception (eg sound or pictures)
Missed-
Can the effects of lossy compression be noticeable?
Images can appear pixelated or present artefacts?
How does the lossy algorithm work?
Reduces size of image by decreasing bit depth and therefore the range of colours available
Can also reduce resolution of image (total no of pixels which make up the image)
What is bit depth?
Of a digital bitmap image determined no of different colours that can be used and the size of file as more bits have to be used per pixel
Slide 8
JPG and MP3 are compressed not the original files
What is lossless compression?
All info is present in original file is retained and is recoverable
Don’t sacrifice any quality - restore image in full original quality when uncompressed
When does we use lossless?
Essential for files such as software and text documents as loss of data can have unacceptable consequences
How do lossless compression algorithms work?
Work by identifying patterns in data + creating a code to recover all original info rather than eliminating bits from original file
Instead of storing every pixel w same binary pattern - store binary for colour followed by no of pixels in a row
Missed
Files are much bigger than lossy
What types of image is lossless suitable for?
Method only effective on images w large areas of continuous colours
Ideal for vector style images (logos, cartoons, icons) but not for full-colour photographs where v few blocks of continuous repeating colours