Data Compression (College Board AP® Computer Science Principles): Exam Questions

20 mins20 questions
1
1 point

What is data compression?

  • The process of encrypting data so it cannot be read

  • The process of permanently deleting files to free up space

  • The process of converting analog data into digital data

  • The process of reducing the number of bits needed to represent data

2
1 point

What is one benefit of compressing a file before sending it over a network?

  • It transfers faster because it uses less bandwidth

  • It guarantees the file can never be corrupted

  • It removes the need to store the file at all

  • It automatically improves the quality of the file

3
1 point

Which statement about lossless compression is correct?

  • Some data is permanently removed and cannot be recovered

  • The original data can be perfectly reconstructed from the compressed version

  • It always reduces file size more than lossy compression

  • It can only be used on image files

4
1 point

Which of the following best explains how a lossless algorithm is able to make a file smaller?

  • By identifying repeated patterns and redundancy and storing them more efficiently

  • By deleting every second bit in the file

  • By permanently removing detail the user is unlikely to notice

  • By converting the file into an encrypted form

5
1 point

A text file is compressed so that it uses fewer bits than before. Which statement is correct?

  • Fewer bits always means some of the original meaning has been lost

  • Fewer bits does not necessarily mean less information; the original meaning can be fully preserved

  • A file can never be represented with fewer bits than its original size

  • Reducing the number of bits always corrupts the file

6
1 point

Which of the following files is most appropriate to compress using a lossless method?

  • A background music track for a game

  • A short promotional video clip

  • A photograph used as a website banner

  • A spreadsheet containing a company's financial records

7
1 point

A law firm needs to compress a signed contract for storage, and every character of the text must remain exactly as written. Which type of compression is appropriate, and why?

  • Lossy, because it produces the smallest possible file

  • Lossy, because legal text is not affected by small changes

  • No compression, because text files cannot be compressed

  • Lossless, because the document must be reconstructed exactly

1
1 point

Which two of the following are benefits of compressing data?

Select two answers.

A. It reduces the amount of storage space required.

B. It always increases the quality of the original data.

C. It speeds up transmission of the data over a network.

D. It removes the need to ever back up the data.

2
1 point

Which of the following best describes lossy compression?

  • It rearranges data so the file opens faster but stays the same size

  • It reduces file size while keeping every detail of the original

  • It permanently removes some data, producing an approximation that cannot be fully restored

  • It encrypts the data so only authorized users can open it

3
1 point

A researcher archives a set of scientific measurements that will be re-analyzed later, and every value must remain exactly correct. Which type of compression should be used, and why?

  • No compression, because compressing any data always corrupts it

  • Lossy, because it always produces the smallest possible file

  • Lossy, because scientific data is never affected by small changes

  • Lossless, because the original data must be reconstructed exactly

4
1 point

A user wants to email a large video clip and does not mind a small drop in quality so long as it sends quickly. Which type of compression is most appropriate?

  • Lossy, because it reduces file size significantly and the small quality loss is acceptable

  • Lossless, because it reduces file size more than lossy compression

  • Lossless, because video files cannot be compressed with lossy methods

  • No compression, because the clip must stay exactly as recorded

5
1 point

Which two factors would most favor choosing lossy over lossless compression?

Select two answers.

A. The data must be reconstructed exactly.

B. The file must be as small as possible.

C. The file is a text document where every character matters.

D. A minor loss of quality will not be noticed by the audience.

6
1 point

Which of the following is not a reason to choose a more aggressive (lossy) compression method?

  • Storage space is very limited

  • The data must be able to be reconstructed exactly

  • The file must transfer quickly over a slow network

  • The end user is unlikely to notice a small quality difference

7
1 point

Two files are the same size. File X contains a single word repeated hundreds of times, while File Y contains dense, non-repetitive data. Which file is likely to compress to a smaller size, and why?

  • File Y, because non-repetitive data always compresses better

  • Both compress by exactly the same amount regardless of content

  • File X, because it contains more redundancy that a compression algorithm can exploit

  • Neither, because files of equal size always compress to equal size

8
1 point

Compared with lossless compression, lossy compression usually does which of the following?

  • Reduces file size more, but the original cannot be perfectly reconstructed

  • Reduces file size less, but preserves every detail of the original

  • Produces a file identical to the original after decompression

  • Increases file size while improving quality

9
1 point

The same image is compressed twice: once with a lossless method and once with a lossy method. After each compressed file is decompressed, which statement is correct?

  • Both decompressed images are identical to the original

  • The lossless image is identical to the original, while the lossy image is an approximation

  • The lossy image is identical to the original, while the lossless image is an approximation

  • Neither decompressed image resembles the original

10
1 point

A web designer wants product photos to load quickly on a shopping site and is willing to accept a slight reduction in image quality. Which type of compression best meets these priorities?

  • Lossless, because it reduces file size more than lossy compression

  • Lossy, because it significantly reduces file size and the small quality loss is acceptable

  • Lossless, because images can only be compressed without any loss

  • No compression, because the photos must stay exactly as taken

11
1 point

Which two factors would most favor choosing lossless over lossy compression?

Select two answers.

A. The data must be reconstructed exactly.

B. The file must be made as small as possible, even if quality drops.

C. The file is program source code where every character matters.

D. A minor loss of quality will not be noticed by the audience.

1
1 point

Which statement about lossy compression is false?

  • Lossy compression produces an approximation of the original data

  • Lossy compression removes some detail to reduce file size

  • Lossy compression allows the original data to be perfectly reconstructed

  • Lossy compression is often used for audio, images, and video

2
1 point

Which of the following statements about the trade-offs of compression is false?

  • Lossy compression can usually achieve a greater reduction in file size than lossless compression

  • Choosing a compression method involves weighing file size against quality

  • Lossless compression always produces a smaller file than lossy compression

  • The best compression method depends on the purpose of the data and how it will be used