Section 3 Chapter 18 - Data Compression and Encryption Flashcards
Why compression is used
To reduce the size of data so that it takes up less storage space or less bandwith
The two types of compression
Lossy and lossless
Lossy compression
Unnecessary information is removed from the original file
Lossless compression
All information required to exactly replicate the file is retained in a more space efficient way
How mp3 uses compression
Lossy compression. Removes sounds at too high frequencies for humans to ear and removes quiet sounds that occur at the same time as loud sounds
How lossless compression works
By recording patterns in the data
Where lossy and lossless compression are used
Lossy - Images, sounds, videos
Lossless - Program files
Run length encoding
Rather than recording every value in a sequence it records the value and how many times it continuosly repeats
Dictionary based compression
A “Dictionary” is sent alongside the data and instead of the actual data being sent the indexes of the dictionary are sent. (lossless)
Encryption
The transformation of data from one form to another so that an unauthorised third party cannot understand it
Plaintext
The original unencrypted data
Ciphertext
The encrypted data
Cipher
A method or algorithm for encrypting data
Caeser Cipher
Each character is shifted along by a certain number
Vernam Cipher
A one time pad of equal or longer length to the plaintext is used and the ciphertext is found by using XOR on the one time pad and the plaintext.