Prepare for the AP Computer Science Exam with our comprehensive quiz. Use our flashcards and multiple-choice questions to test your knowledge and uncover valuable hints. Get exam-ready today!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What is an example of compression that allows full recovery of original data?

  1. JPEG

  2. PNG

  3. MP3

  4. GIF

The correct answer is: PNG

The choice of PNG as an example of compression that allows full recovery of original data is correct because PNG uses lossless compression. This means that when an image is saved in PNG format, none of the original pixel data is lost during the compression process. As a result, when a PNG file is decompressed, it perfectly reconstructs the original image, allowing for complete fidelity and accuracy. In contrast, formats like JPEG use lossy compression, which discards some image data to reduce file size, leading to potential loss of quality that cannot be restored. Similarly, MP3 is a lossy compression format for audio, meaning that it reduces file size by eliminating frequencies that are less audible to the human ear. GIF, while it can preserve original data in some respect, is limited to a maximum of 256 colors and is often not considered a true image representation of original data due to this color limitation. Thus, PNG represents a clear example of effective lossless compression, allowing for full recovery of the original data without any alteration or loss.