Data Compression MCQ Practice

Question 1 of 10

A student compresses the text AAAABBBAAABBBB using a run-length scheme that stores each run as (symbol, count). The compressed form is (A,4)(B,3)(A,3)(B,4).

Can the original 14-character string be restored exactly from that compressed form?

  1. A. Yes; every run length and symbol is preserved, so expansion rebuilds AAAABBBAAABBBB.
  2. B. No; run-length compression is always lossy.
  3. C. Yes, but only the letters A and B survive; the order of runs is lost.
  4. D. No; counts discard how many characters existed.

Question 2 of 10

A photo editor reduces a 4000-by-3000 pixel image to 800-by-600 pixels and saves it, discarding the unused pixel values. A classmate wants the exact original 4000-by-3000 pixel grid back from only the saved file.

Which conclusion is correct?

  1. A. The original grid can be restored because resizing is lossless.
  2. B. The original cannot be restored; discarded pixel values are not in the saved file (lossy reduction).
  3. C. The original can be restored by stretching the 800-by-600 image, which recreates every original pixel value.
  4. D. Any smaller file can always reconstruct a larger original.

Question 3 of 10

Two encodings of the same 20-character message are compared.

Version What is stored Size
Raw 20 characters as written 160 bits
Compressed Dictionary of repeated words plus short codes 96 bits

The compressed version expands back to the identical 20-character message. Which statement is best?

  1. A. Dictionary methods cannot reduce bit count.
  2. B. Fewer bits means some letters must be missing permanently.
  3. C. Lossless compression reduced size by removing redundancy while still allowing exact reconstruction.
  4. D. The compressed file must be lossy because it is smaller.

Question 4 of 10

A podcast is saved twice from the same master recording.

File Process Result when compared to master
P Compress with an algorithm that keeps every sample value reconstructible Matches master sample-for-sample
Q Remove inaudible frequency bands and save fewer bits Sounds similar but samples differ

Which choice correctly labels P and Q?

  1. A. Both lossless
  2. B. Both lossy
  3. C. P lossy, Q lossless
  4. D. P lossless, Q lossy

Question 5 of 10

A museum needs archival scans of handwritten letters where every ink mark must remain recoverable. Network staff also want smaller files for email previews.

Which plan best matches the priorities?

  1. A. Store archives with lossless compression; create separate lossy previews for email when exact recovery is not required.
  2. B. Use lossy compression for archives and lossless for previews.
  3. C. Avoid compression entirely for previews only.
  4. D. Use only aggressive lossy compression for both archive and preview because smaller is always better.

Question 6 of 10

Before: the string MISSISSIPPI. After a lossless compressor: a shorter bit sequence that expands back to MISSISSIPPI.

What was primarily removed?

  1. A. The letters S and I, which can never return
  2. B. Redundant structure that the algorithm could encode more briefly
  3. C. Half of the characters at random
  4. D. The ordering of letters

Question 7 of 10

A map app stores route lines. Version L uses a lossless encoding of every GPS point. Version Y keeps only every 10th point and draws straight segments between them.

Checkpoint Original GPS list length Stored in L Stored in Y
Route R 500 points 500 points (encoded) 50 points

A surveyor needs the exact original 500 coordinates. Which file works?

  1. A. Neither file can store coordinates
  2. B. Only Y, because fewer points are easier to trust
  3. C. Only L, because Y permanently dropped 450 coordinates
  4. D. Either file, because straight segments recreate GPS noise exactly

Question 8 of 10

A grayscale icon is 8-by-8 pixels. Each pixel is a number 0-255. A lossy method replaces each 2-by-2 block with the average of its four values, storing 16 averages instead of 64 pixels.

After decompression that paints each 2-by-2 block with its average, which claim is true?

  1. A. The method is lossless whenever the averages are whole numbers.
  2. B. Averaging increases the bit count, so it cannot be compression.
  3. C. Every original pixel value is guaranteed to return.
  4. D. The original 64-pixel grid generally cannot be restored because distinct pixels were replaced by one average.

Question 9 of 10

Engineers compare two compressors on the same sensor log. Lossless method A shrinks the file by 35%. Lossy method B shrinks it by 80% but changes some readings by up to 2 units.

When is method B the better choice?

  1. A. When transmission time is critical and approximate readings within 2 units are acceptable
  2. B. Whenever a file can be made smaller by any means, regardless of accuracy needs
  3. C. Only when the data contain no redundancy
  4. D. When analysts must reproduce every original reading exactly for an audit

Question 10 of 10

A comic panel is stored as: (1) a full lossless PNG-style encoding of every pixel, and (2) a tiny thumbnail that blurs fine ink lines.

Which statement about restoring the original panel is correct?

  1. A. The thumbnail alone restores every original pixel.
  2. B. Only the lossless encoding guarantees restoration of the original pixel grid; the thumbnail is an approximation.
  3. C. Both files are equally able to restore the original because they show the same characters.
  4. D. Blurring is lossless if the file size decreases.