Compression
Compression is the process of reducing data size so it can be stored, transferred, or delivered more efficiently.
Compression is used across file archives, images, video, audio, databases, network transfer, and web delivery.
What it does
Compression reduces the amount of data that needs to be stored or transmitted.
It is commonly used to:
- Make files smaller
- Speed up transfer and download times
- Reduce bandwidth usage
- Lower storage requirements
- Package data more efficiently for delivery
Core concepts
Lossless vs lossy
Compression can be lossless or lossy.
Lossless compression preserves the original data exactly, while lossy compression reduces size by permanently discarding some information.
Format-dependent behavior
Compression is often tied to a file or delivery format.
For example, archive formats such as 7z and ZIP use compression differently than image formats such as AVIF or WebP.
Storage and transfer efficiency
The main value of compression is efficiency.
That can mean faster downloads, lower storage cost, or reduced network load.
Common use cases
- File archives
- Website asset delivery
- Image optimization
- Media encoding
- Database and backup storage
Practical notes
- Better compression often comes with tradeoffs in CPU time, encoding speed, compatibility, or quality.
- The best format depends on the goal: archival efficiency, compatibility, media quality, or runtime performance.
- Compression and archive are related but not identical concepts.
- Compression is especially important in web performance and storage workflows.
Sources Used
Frequently Asked Questions
Is compression always lossless?
No. Some compression is lossless, while some is lossy.
Is an archive the same as compression?
No. An archive is a container format, while compression is the process of reducing data size.
Why is compression important for websites?
Because smaller assets usually load faster and consume less bandwidth.