Compression Flashcards
compression
A reduction in the number of bits needed to represent data
It reduces the size of the file
advantages of compression
it reduces the size of the file so
the transfer speed is quicker
uses less bandwidth, reducing internet traffic
takes up less storage space
allows large multimedia files to be streamed
2 types of lossless compression
RLE (Run Length Encoding)
Dictionary
Run Length Encoding
It uses a compression algorithm
No data is lost
Looks for repeated patterns
Replaces consecutive identical values into a code consisting of
the value of the data and a count (number of times it repeats) e.g. AAbbaaaBB = A2b2a3B2
Dictionary compression
It uses a compression algorithm
No data is lost
Looks for repeated patterns
Maintains a dictionary (index) of repeating patterns within a file.
Each pattern is given an ID/value
The patterns are replaced by their ID /value
lossy compression
It uses a compression algorithm
unnecessary data is lost(deleted) and cannot be restored
Uses perception shaping (changes that cannot be noticed)
describe how lossy compression could compress a music file
It uses a compression algorithm
Uses perception shaping If 2 sounds played at the same time it removes the softer sound Reduces bit rate/sample resolution Reduces the sample rate Removes sounds the human ear cannot hear
describe how lossy compression could compress an image file
It uses a compression algorithm
Use perception shaping
Similar colours are made the same
uses less colours (colour depth reduced)
reduce number of pixels (image resolution reduced
Describe how lossy compression could compress an video file
It uses a compression algorithm
reduce frame rate similar colours are made the same uses perception shaping uses less colours (colour depth reduced) reduce number of pixels (image resolution reduced)
What type of compression and why…
emailing a text document
Lossless
RLE or Dictionary would be used
No data is lost
File can be restored to it’s original state so it can be easily read
Lossy would remove data
So cannot be read when uncompressed
What type of compression and why…
emailing a holiday image
Lossy
would reduce the file size more than lossless
removes redundant/unnecessary data
images can still be of a similar quality (perception shaping)
file does not need to be restored to it’s original state
Faster to send / upload / download
State 4 image file formats and their type of compression
.bmp - uncompresssed file format
.png - lossless compression
.jpeg - lossy compression
.gif - lossless compression
State 2 audio file formats and their type of compression
,mp3 - lossy compression
.wav - lossless compression
.flac - lossless compression
file format for compressing documents
.zip
an archive that contains one or more files compressed