Data Representation - Compression Flashcards

1
Q

What is data compression?

A

When we make file sizes smaller

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

What are the uses of compressing data?

A

Smaller files take up less storage space
Streaming and downloading files from the internet is quicker as they take less bandwidth
It allows web pages to load faster in web browsers
There is sometimes a limit when emailing attachments - can make the file smaller so we can send it

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

What does lossy compression do?

A

It permanently removes data from the file reducing the number of bits the files needed which reduces the size

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

What is lossless compression?

A

Makes the file smaller by temporarily removing data to store the file and then restores it to its original state when it is opened

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

What are the advantages of lossy compression?

A

Greatly reduced file size
Take up less bandwidth so they can be downloaded and streamed faster
Commonly used - lots of software can read lost files

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

What are the advantages of lossless compression?

A

Data is only removed temporarily - no reduction in quality
Lossless files can be decompressed (turned back to the original)
Can be used on text and software files

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

What are the disadvantages of lossy compression?

A

Permanently loses data
Can’t be used on text and software files as these need to retain all the information of the original
Lossy files are worse quality than the original (usually unnoticeable)

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

What are the disadvantages of lossless compression?

A

It only reduces the file size slightly so it will still take up quite a bit so space and download/streaming speeds will be slower compared to lossy compression

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

What are examples of lossy compression?

A

MP3 - audio
AAC - audio
JPEF - image

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

What are examples of lossless compression?

A

FLAC - audio
TIFF - image
PNG - image

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

What does RLE stand for?

A

Run-Length Encoding

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

What is RLE?

A

A form of lossless compression

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

How does RLE work?

A

Looks for “a run”
It stored the number of times it repeats and one copy of the data rather than the whole thing

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

What is a “run”?

A

Consecutive repeating data in a file

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

What is the downside of RLE?

A

If the data doesn’t have many runs of repeated data, the file size will not be significantly decreased

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

Why can’t RLE really be used for binary?

A

You need long runs of repeated data to actually reduce the size

17
Q

What is Huffman coding?

A

It gives shorter binary codes to data values that appear more frequently