Which extension denotes a graphics format that supports lossless data compression and is commonly used on the web?

Prepare for the CodeHS AP Computer Science Principles Exam with multiple choice questions, detailed explanations, and helpful hints. Boost your confidence and get ready for your exam!

Multiple Choice

Which extension denotes a graphics format that supports lossless data compression and is commonly used on the web?

Explanation:
This question is about formats that use lossless compression and are common on the web. Lossless means no image data is discarded when you decompress it, so every pixel stays exactly as it was. PNG fits this description because it uses a lossless, deflate-based compression method and is widely supported by browsers. It preserves sharp edges and text well, handles high color depth, and supports transparency (an alpha channel), which is very useful for web graphics like logos and icons. That combination—lossless compression, good color support, transparency, and broad browser compatibility—makes PNG a preferred web format. For context, JPEG uses lossy compression, so some detail is permanently lost to reduce file size; GIF is lossless but limited to 256 colors and older in features; BMP often isn’t compressed well for web use and results in larger files. PNG’s balance of true lossless compression with strong web support is why it’s the right choice here.

This question is about formats that use lossless compression and are common on the web. Lossless means no image data is discarded when you decompress it, so every pixel stays exactly as it was.

PNG fits this description because it uses a lossless, deflate-based compression method and is widely supported by browsers. It preserves sharp edges and text well, handles high color depth, and supports transparency (an alpha channel), which is very useful for web graphics like logos and icons. That combination—lossless compression, good color support, transparency, and broad browser compatibility—makes PNG a preferred web format.

For context, JPEG uses lossy compression, so some detail is permanently lost to reduce file size; GIF is lossless but limited to 256 colors and older in features; BMP often isn’t compressed well for web use and results in larger files. PNG’s balance of true lossless compression with strong web support is why it’s the right choice here.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy