Data compression is a key topic in IB Computer Science because it explains how large files are reduced in size to save storage space and improve transmission speed. Students are expected to clearly distinguish between lossy and lossless compression, explain how each works, and justify when each should be used.
Many students lose marks by giving vague definitions or by confusing the two methods. Precise explanations are essential.
What Is Data Compression?
Data compression is the process of reducing the size of a file by removing or encoding data more efficiently.
Compression is used to:
- Reduce storage requirements
- Speed up file transfer
- Reduce bandwidth usage
There are two main types of compression in IB Computer Science:
- Lossless compression
- Lossy compression
What Is Lossless Compression?
Lossless compression reduces file size without losing any data.
This means:
- The original file can be perfectly reconstructed
- No information is permanently removed
- Data integrity is preserved
Lossless compression works by:
- Removing redundancy
- Using more efficient encoding
Common lossless formats include:
- ZIP files
- PNG images
- FLAC audio
