Table of Contents
What is Data Compression?
Data compression is the process of re-encoding data so it takes fewer bits than the original, reducing the storage space and bandwidth it needs. Compression is either lossless, which preserves every bit, or lossy, which permanently discards some detail to reach a smaller size.
Compression happens constantly, usually without anyone noticing. Web pages are compressed before they reach your browser, photos are compressed when a phone saves them, and backup systems compress data before it is written to disk or sent to the cloud.
For IT teams, compression is a cost lever. Every gigabyte saved is storage that does not need to be bought, and data that crosses the network faster.
Key takeaways
- Compression stores the same information in fewer bits.
- Lossless compression keeps every bit. Lossy compression discards some.
- Compression cuts storage, transfer time, and bandwidth costs, but uses CPU.
- Deduplication is a different technique: it removes duplicate data across files, not within them.
How does data compression work?
A compression algorithm looks for redundancy and replaces it with something shorter. Three common approaches:
- Repeated runs: Ten identical pixels in a row become one instruction: "this color, ten times."
- Back-references: When a sequence appears again, the algorithm stores a short pointer to the first occurrence instead of the full sequence.
- Shorter codes for common patterns: Frequent characters or byte patterns get short codes; rare ones get longer codes.
How much space this saves depends on the data. Text and logs with lots of repetition compress well; files that are already compressed, such as JPEGs or ZIP archives, barely shrink. TechTarget's data compression guide notes that files sent over the internet commonly use compressed formats such as ZIP and GZIP.
Decompression reverses the process. The receiving system reads the shorter codes and pointers and rebuilds the original data, exactly for lossless formats and approximately for lossy ones.
Lossless vs lossy compression: what is the difference?
Use lossless compression when every bit matters. Use lossy compression when a smaller file is worth a small loss in quality.
| Lossless | Lossy | |
|---|---|---|
|
Data after decompression
|
Identical to the original
|
An approximation of the original
|
|
Compression ratio
|
Lower
|
Much higher
|
|
Typical data
|
Databases, documents, backups, source code, professional media
|
Photos, streaming audio and video
|
|
Example formats
|
ZIP, GZIP, PNG, FLAC
|
JPEG, MP3, AAC, H.264 video
|
Backups always use lossless compression: a restored file must match the original exactly.
Lossy compression works because people do not perceive every detail. It removes sounds outside normal hearing and fine color differences the eye blends together, which is why a well-compressed photo or song can look and sound almost unchanged.
The loss is permanent, though. Re-saving a lossy file compresses it again and degrades quality further, so master copies should always be kept in a lossless format.
What is a compression ratio?
A compression ratio compares a file's original size with its compressed size. At 2:1, a 20 MB file takes up 10 MB. TechTarget notes that lossless methods typically achieve lower ratios than lossy methods.
Ratios vary widely with the data. Repetitive text and logs can compress many times over, while data that is already compressed or encrypted barely shrinks at all.
That is why storage vendors quote compression savings as a range or an average, not a guarantee. The ratio you see depends on what you store.
What is data compression used for?
- Backup and storage: Compressing backup data reduces the disk and cloud capacity needed to retain it.
- Network transfer: Compressed files and web content move faster and use less bandwidth.
- Audio: Codecs keep files within bandwidth and storage limits. MP3 and AAC are common lossy formats; FLAC is a common lossless format.
- Video: Uncompressed video needs a very high data rate, so most video uses lossy codecs. In Bitmovin's 9th Video Developer Report, a survey of video developers conducted in July 2025, 65% of respondents used H.264/AVC in production and 41% used HEVC.
For most businesses, backup and storage is where compression has the most direct financial impact. Backup data grows with every retention cycle, so even modest compression ratios compound into large savings over months and years.
Data compression vs deduplication: what is the difference?
Compression shrinks data within a file. Deduplication removes duplicate data across files.
| Compression | Deduplication | |
|---|---|---|
|
Works on
|
Bits inside a single file or data stream
|
Chunks repeated across many files or backups
|
|
How it saves space
|
Re-encodes redundant patterns with shorter codes
|
Stores each unique chunk once and replaces repeats with pointers
|
|
Best for
|
Any data with internal redundancy
|
Repeated backups, virtual machines, shared files
|
Compression lowers storage hardware, bandwidth, and transfer costs, and it shortens backup and replication windows. The trade-off is processing power: compressing large data sets consumes CPU, so vendors focus on doing it quickly and efficiently.
Shorter transfer times also matter for recovery. Compressed backups replicate offsite faster, which helps keep an up-to-date copy of data outside the primary site.
Why does data compression matter?
Backup systems typically use both: deduplication first removes repeated chunks, then compression shrinks what remains.
The order matters. Deduplicating first means the system compresses each unique chunk only once, instead of compressing the same data again every time it is backed up. Barracuda Backup applies both techniques to reduce the storage backups need.
How Barracuda can help
Barracuda Backup uses compression and deduplication to reduce the storage space backups need. Running backups on a dedicated appliance gives both processes their own processing power, so compression does not compete with production workloads.
The result is less storage to buy for on-premises backups and less data to send when backups replicate offsite or to the cloud.
Frequently asked questions
Yes. ZIP and GZIP are lossless formats: when you extract a file, it is bit-for-bit identical to the original. That is why they are used for documents, software, and backups, where any data loss is unacceptable.
Only lossy compression does. Lossless compression, used for documents, databases, and backups, restores data exactly. Lossy compression, used for JPEG photos and streaming audio and video, permanently discards detail to reach much smaller file sizes.
Both. Deduplication removes chunks repeated across backups, such as the same files saved every night, and compression then shrinks the unique data that remains. Used together, they reduce backup storage far more than either technique alone.
Yes. Barracuda Backup uses both compression and deduplication to reduce the storage space backups require, which lowers the disk and cloud capacity needed to retain backup data.
Compression and deduplication are CPU-intensive. Barracuda Backup runs them on a dedicated backup appliance, so the processing load does not compete with production servers and applications.