1.3.1: Compression, Encryption, and Hashing Flashcards
1
Q
What is Lossy?
A
- Compressing files by deleting unnecessary metadata
2
Q
What are the disadvantages of Lossy?
A
- Data is lost permanently
- Quality is sacrificed
3
Q
What is an advantage of Lossy?
A
- File size reduces dramatically
4
Q
How is Lossy implemented?
A
- Reducing number of colours or cropping an image
5
Q
What is Lossless?
A
- Compressing files by temporarily reducing file size
6
Q
What is an advantage of Lossless?
A
- No data is lost
- Quality is not sacrificed
- The original data can be retrieved
7
Q
What is a disadvantage of Lossless?
A
- File size isn’t as reduced as with Lossy as all the original data is still present when the file is accessed
8
Q
How is Lossless implemented?
A
- Run Length Encoding
- Dictionary Encoding
9
Q
How does Run Length Encoding work?
A
- An algorithm will identify sequences of colours and replace them
10
Q
How does Dictionary Encoding work?
A
- Repetitive characters or words are replaced
11
Q
Where would Lossy be most beneficial?
A
- When uploading, downloading, or streaming off the internet
12
Q
Where would Lossless be most beneficial?
A
- Compressing high quality photos over the internet, where the quality would be required to be uncompromised but the file would be originally too large to efficiently send over the internet
13
Q
What is Run Length Encoding?
A
- A method of Lossless compression in which repeated values are removed and replaced with one occurrence of the data followed by the number of times it should be repeated
- Example: AAAAAABBBBBCCC could be represented as A6B5C3
14
Q
What is required for Run Length Encoding to work well?
A
- Consecutive pieces of data being the same
- If there is little repetition, RLE doesn’t offer a great reduction in file size
15
Q
What is Dictionary Encoding?
A
- A method of Lossless compression where frequently occurring pieces of data are replaced with an index and compressed data is stored alongside a dictionary matching frequently occurring data to an index
- The original size can be restored using the dictionary
16
Q
What is Encryption?
A
- The process by which plaintext (data) is transformed into an unreadable file which can be deciphered using a key authorised by users
17
Q
Why is Encryption used?
A
- To prevent unauthorised viewing of private and confidential files
- Used for protecting data when being sent across the internet