Compression (lossy vs lossless)
Also known as: lossy compression, lossless compression, file compression
Compression shrinks a file by encoding its data more efficiently. Lossless compression rebuilds the original exactly, while lossy compression permanently discards detail the eye or ear is least likely to notice in exchange for much smaller files.
- Lossless = exact rebuild; lossy = smaller, some detail dropped
- Photos, music, and video are almost always lossy
- Better compression stores the same media in less space
Lossy vs lossless
Lossless compression (used by formats like PNG and ZIP) packs data so it can be restored bit-for-bit — nothing is thrown away, so size savings are modest. Lossy compression (used by JPEG, HEIC, MP3, and most video) deletes information the human eye or ear barely perceives, which is why it shrinks photos, music, and video so dramatically.
The trade-off is quality. Each time a lossy file is re-saved it can lose a little more detail, while a lossless file stays pristine no matter how many times it is opened and saved.
Why it matters for storage
Nearly every photo and video on your phone is already lossy-compressed — that is how a high-resolution image fits in a few megabytes. Choosing a more efficient format (HEIC over JPEG, HEVC over H.264) is essentially choosing better compression, which is one of the simplest ways to store the same media in less space.