Need for Compression (AQA GCSE Computer Science): Revision Notes
Data compression - Need for compression
Why do we need data compression?
When we store or send digital files like photos, videos, or music, they can become incredibly large. Think about taking a high-quality photo on your phone - it might be several megabytes in size! This creates two main problems:
Storage issues: Large files quickly fill up memory on devices like phones, tablets, or computers. If you have hundreds of photos and videos, you might run out of space completely.
Transmission problems: Sending large files over the internet takes a very long time and can be expensive. Imagine trying to send a 50MB video to a friend - it could take ages to upload and download, especially with slower internet connections.
Data compression solves these problems by making files smaller while keeping the important information we need.
Modern smartphones can generate photos that are 10-20MB each, and just a few minutes of 4K video can consume over 1GB of storage space. Without compression, a typical phone's storage would be filled after taking just a few hundred photos!
Understanding file sizes with worked examples
Let's see how quickly files can become huge with a sound recording example:
Worked Example: Calculating Audio File Size
A 1-minute audio sample recorded at 44.1 kHz (CD quality) with 16-bit resolution:
Step 1: Calculate bits per second
- 44.1 kHz means 44,100 samples every second
- Each sample uses 16 bits
- Bits per second = bits per second
Step 2: Calculate total bits for 1 minute
- 1 minute = 60 seconds
- Total bits = bits
Step 3: Convert to more useful units
- Divide by 8 to get bytes = bytes
- Divide by 1,000,000 to get megabytes = 5.29 MB
That's over 5MB for just one minute of audio! For stereo sound, you'd double this to get 10.58 MB.
Types of data compression
There are two main approaches to making files smaller:
Lossy compression
Lossy compression permanently removes some data from the original file to make it smaller. The key word here is "permanently" - once you compress a file using lossy compression, you can never get back the exact original quality.
How it works:
- Removes data that humans are less likely to notice
- For sound files, it might remove very high or very low frequencies that most people can't hear well
- For images, it might combine similar colours together or remove fine details

The image above shows the same photograph compressed using lossy compression. The top version is 364 KB while the bottom is 166 KB. You can see some loss of detail in the smaller file, but the essential features remain clearly visible.
Once a file has been compressed using lossy techniques, it cannot be reversed to restore the original quality. Think of it like squeezing a sponge - you can't unsqueeze it back to exactly how it was.
Lossless compression
Lossless compression reduces file size without permanently losing any information. This means you can always recreate the original file exactly as it was before compression.
This type of compression is essential for:
- Computer programmes (removing any instructions would break them)
- Text documents (losing letters or words would change the meaning)
- Any file where perfect accuracy is required
Lossless compression works by storing data more efficiently, like finding patterns and shortcuts, but keeping all the original information available.
The key difference: Lossy = smaller files, some quality loss vs Lossless = larger files, no quality loss. Choose based on whether you can accept some quality reduction in exchange for much smaller file sizes.
Real-world applications
Understanding compression helps explain many everyday computing experiences:
Music streaming: Services like Spotify use lossy compression to stream songs quickly without using too much data.
Photo sharing: When you upload photos to social media, they're often compressed automatically to save storage space and load faster.
Video calls: Your video is compressed in real-time to send over the internet fast enough for smooth conversations.
File storage: Many devices automatically compress files to save space while keeping them accessible.
Next time you notice a video call pixelating during poor internet connection, or photos looking slightly different after uploading to social media, you're seeing compression algorithms at work!
Remember!
Key Points to Remember:
- Data compression makes files smaller to solve storage and transmission problems
- Large uncompressed files can be several megabytes even for short audio or small images
- Lossy compression permanently removes some data but creates very small files
- Lossless compression keeps all original data but doesn't compress as much
- Choose the right type: Use lossy for media files where some quality loss is acceptable, lossless for important documents or programmes