1.3.1 Compression, Encryption and Hashing Flashcards

1
Q

What is compression?

A

The process used to reduce the storage space required by a file

Compression allows more files to be stored in the same amount of space and is important for file sharing over networks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the two categories of compression?

A

Lossy and lossless

Lossy compression reduces file size by removing information, while lossless compression retains all original information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is lossy compression?

A

A method that reduces file size by removing some information

This can result in lower quality, such as pixelated images or unclear audio.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is lossless compression?

A

A method that reduces file size without losing any information

The original file can be fully recovered from the compressed version.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is run length encoding (RLE)?

A

A method of lossless compression that replaces repeated values with one occurrence and a count

Example: AAAAAABBBBBCCC can be represented as A6B5C3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is dictionary encoding?

A

A method of lossless compression where frequently occurring data is replaced with an index

The original data can be restored using a dictionary of indices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is encryption?

A

The process used to keep data secure during transmission

It scrambles data before transmission and deciphers it upon arrival.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is symmetric encryption?

A

A method where both sender and receiver share the same private key

The key is used for both encrypting and decrypting data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is asymmetric encryption?

A

A method that uses two keys: a public key and a private key

Only the recipient’s private key can decrypt messages encrypted with their public key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is hashing?

A

The process of converting an input into a fixed size value called a hash

The output of a hash function cannot be reversed to form the original input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a hash table?

A

A data structure that holds key-value pairs

It uses a bucket array and a hash function for constant time data lookup.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a collision in hashing?

A

When two pieces of data produce the same hash value

Methods to handle collisions include storing items in a list or using a second hash function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Fill in the blank: A good hash function should have a low chance of ______.

A

collision

It should also be quick to calculate and provide a smaller output than the input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly