1.3.1 Encryption Compression Hashing Flashcards
Compression
Reducing the storage space required by a file.
Benefits of compression
- Store more files with the same amount of storage space
- Reduces the time taken to share files over networks or the internet, as larger files require a longer time to transfer
Lossy Compression
Reduces the size of a file while permanently removing of its information. This could result in a more pixelated image, or less clear audio recording.
Lossless compression
Reducing the size of a file without losing any information.
How can lossy compression be used on an audio file?
Removing the very high or very low frequencies which are less noticeable to the ear.
Which compression method allows you to still be able to recover the original file?
Lossless
How does Run Length Encoding work?
Repeated values are replaced with one occurrence of the data, followed by the number of times it should be repeated.
Is RLE a form of lossy or lossless compression?
Lossless.
Apply RLE to the following string.
AAAAABBCCC
A5B2C3
In order for RLE to work well, what does it rely on?
Consecutive pieces of data being the same. If there’s little repitition, RLE doesn’t offer a great reduction in file size.
How does Dictionary Encoding work?
- Frequently occuring pieces of data are replaced with an index.
- Compressed data is stored alongside a dictionary which matches the frequently occuring data to an index.
- The original data can then be restored using the dictionary.
Is Dictionary Encoding a method of lossy compression or lossless compression?
Lossless.
What is an important thing to remember about data compressed using dictionary compression?
The data must be transferred alongside its dictionary.
What is encryption useful for?
Keeping data secure when its being transmitted.
Symmetric encryption
Both the sender and receiver share the same private key, which they distribute to each other in a process called a key exchange. This key is used for both encrypting and decrypting data.