Lossy data compression is a technique that significantly reduces the number of bits stored or transmitted by permanently removing less important information, meaning the original data can only be approximately reconstructed. In AP CSP, it's the trade-off counterpart to lossless compression (Topic 2.2).
Lossy data compression shrinks a file by throwing away information the algorithm decides you won't miss, like sound frequencies your ears can barely hear or color details your eyes can't distinguish. Once that data is gone, it's gone for good. You can decompress the file, but you only get back an approximation of the original, not a perfect copy.
The payoff is size. Lossy algorithms can usually make files much smaller than lossless ones can, which is why they dominate anywhere bandwidth or storage is tight. JPEG images and MP3 audio are the classic examples. The AP CSP framing is all about trade-offs. Lossy compression trades perfect fidelity for a big reduction in bits, and your job on the exam is to decide whether that trade is worth it in a given context.
This term lives in Unit 2: Data, specifically Topic 2.2: Data Compression, under learning objective AP Comp Sci P 2.2.A, which asks you to compare compression algorithms and pick the best one for a particular context. The essential knowledge statements spell out the contrast directly. Lossless compression guarantees complete reconstruction of the original data, while lossy compression can significantly reduce size but only allows approximate reconstruction. Two other EK ideas matter here too. Fewer bits doesn't necessarily mean less information, and how much a file shrinks depends on both the redundancy in the data and the algorithm used. Lossy compression is the go-to example of a computing trade-off, which makes it a natural fit for questions about transmitting data over the Internet and storing it efficiently.
Keep studying AP Computer Science Principles Unit 2
Lossless data compression (Unit 2)
Lossless is the other half of the trade-off. It guarantees you can rebuild the original file bit-for-bit, but it usually can't shrink the file as much as lossy can. Every compression question on the exam is really asking which side of this trade-off the scenario needs.
JPEG (Unit 2)
JPEG is the textbook lossy format for images. It discards fine visual detail your eye barely notices, which is why a JPEG saved over and over slowly degrades. When a question mentions photos shared online, JPEG-style lossy compression is usually the right answer.
MP3 (Unit 2)
MP3 applies the same idea to audio by removing frequencies most people can't hear. It's a great example of EK DAT-1.D.2 in action, since fewer bits doesn't necessarily mean less information from the listener's point of view.
Bitrate (Unit 2)
Bitrate measures how many bits get sent per second, and it explains why streaming services love lossy compression. Smaller files mean lower bitrates, which means smoother playback over limited bandwidth.
Lossy compression shows up in multiple-choice questions in two main flavors. The first asks you to identify a characteristic of lossy compression, where the key phrase is that data is permanently removed and the original can only be approximately reconstructed. The second gives you a scenario and asks which compression approach fits best. A classic example is a video streaming service sending movies to millions of users with limited bandwidth, where transmission speed matters more than perfect quality, so lossy wins. Flip the scenario to medical records, legal documents, or program code, where every bit must survive, and lossless wins. The skill the exam wants is matching the trade-off to the context, not just reciting the definition.
Both reduce file size, but they make opposite promises. Lossless compression guarantees you can perfectly reconstruct the original data, so nothing is ever truly lost. Lossy compression permanently deletes information to achieve a bigger size reduction, so you can never get the exact original back. Quick test for exam questions. If the scenario says quality can drop a little but speed or size matters most, pick lossy. If the scenario says the data must be exact, pick lossless.
Lossy compression permanently removes less important data, so the original file can only be approximately reconstructed.
Lossy algorithms usually achieve much greater size reduction than lossless algorithms, which is the whole reason to accept the data loss.
Choose lossy when reduced size or faster transmission matters more than perfect quality, like streaming video or sharing photos.
Choose lossless instead when every bit must be preserved exactly, like text documents, program code, or medical data.
Fewer bits does not necessarily mean less useful information, since lossy formats like MP3 remove details humans can barely perceive anyway.
AP Comp Sci P 2.2.A asks you to compare compression algorithms and pick the best one for a specific context, so always read the scenario for clues about quality versus size.
It's a compression method that significantly reduces file size by permanently removing less important information, so the decompressed file is only an approximation of the original. It's covered in Topic 2.2 of Unit 2 under learning objective AP Comp Sci P 2.2.A.
No. The discarded data is permanently gone, so you can only reconstruct an approximation of the original. That's the defining difference from lossless compression, which guarantees a perfect bit-for-bit reconstruction.
Lossless compression reduces size while guaranteeing complete reconstruction of the original data. Lossy compression achieves much bigger size reductions but permanently deletes some information, so quality is sacrificed for smaller files.
JPEG for images and MP3 for audio are the classic examples. Both remove details humans barely perceive, like subtle color variations or inaudible frequencies, to dramatically shrink file size.
Pick lossy when the scenario prioritizes small size or fast transmission over perfect quality, like a streaming service sending video to millions of users over limited bandwidth. If the scenario requires exact data, like documents or code, pick lossless instead.
Connect this key term to the AP exam workflow: review the course, practice questions, and check related study tools.
Review units, study guides, and course resources.
Check this vocabulary in multiple-choice context.
Apply key concepts in written AP responses.
Estimate the exam score you are working toward.
Review the highest-yield facts before practice.
Put the full course together before test day.