Lossy & Lossless Compression (OCR A Level Computer Science)

Revision Note

Callum Davies

Expertise

Computer Science

Lossy & Lossless Compression

Why is Compression needed in Data Transfer?

  • Compression is crucial for reducing file size to facilitate efficient data transfer over the Internet

  • Smaller files have faster transmission times and require less bandwidth consumption

compression-types-lossy-lossless-compared

Comparing Types of Compression

  • There are two main methods of shrinking digital files: Lossy and Lossless compression

  • In simplified terms,

    • Lossy: Some data is discarded

    • Lossless: Keeps everything, no data lost

  • Thanks to Moore's Law, technology such as cameras continue to improve each year and are capable of capturing more data

  • A Standard Definition film doesn't contain as much detail as a 4K film, because it fundamentally contains less data in the file

  • New advancements in camera technology make it possible to capture more colour, contrast and audio data

Below is a table highlighting the benefits and drawbacks of Lossy and Lossless compression:

Compression

Benefits

Drawbacks

Lossy

  • Greatly reduced file sizes

  • Suitable for media streaming where some data loss is acceptable

  • Irreversible loss of data quality

  • Not suitable for text or archival storage

Lossless

  • Maintains original data

  • Best for text and data that require integrity

  • Larger file sizes than lossy

  • Requires high bandwidth when streaming

Recommending a type of Compression

To recommend a type of compression, evaluate the application's requirements:

  • If data integrity is imperative, recommend lossless compression

  • If achieving a small file size or quick data transfer is prioritised, and some data loss is acceptable, choose lossy compression

Exam Tip

  • When asked to recommend a compression type, the choice will always depend on the specific scenario requirements

Worked Example

A graphic designer has two tasks: selecting an appropriate compression method for a high-resolution logo intended for a client's brand identity and for an image used in a social media campaign.

Recommend a compression type for each file and justify your choices.

[4]

How to answer this question:

To secure all 4 marks, you need to specify the type of compression for each file type and offer a detailed rationale for your choices. Make sure to highlight the benefits and potential drawbacks of each situation.

  • High-Resolution Logo: For this, Lossless Compression is the best choice. This method ensures no loss of image quality, which is crucial for professional branding. Lossless Compression is particularly advantageous when the logo is to be printed or included in high-definition media where pixel-perfect clarity is required.

  • Social Media Campaign Image: Lossy Compression is preferable in this scenario. This compression type drastically reduces file sizes, making the image easier to upload and quicker to load on social media platforms. Although there may be a slight loss in quality, the trade-off is generally acceptable for social media's fast-paced and transient nature.

Answer:

Example answer that gets full marks:

I recommend Lossless Compression for the high-resolution logo that is part of the client's brand identity. Lossless Compression preserves the image's original quality, which is key for professional presentations and branding. This choice is essential so that the logo remains high-quality for use in prints or high-definition media where every detail matters.

For the image designated for the social media campaign, Lossy Compression is more appropriate. This method significantly reduces file size, facilitating faster uploads and quicker loading times on social media. While there's a slight degradation in image quality, this is a reasonable trade-off given social media platforms' temporary and fast-paced environment.

Acceptable answers you could have given instead:

Lossless Compression should be used for the high-resolution logo as it maintains data integrity, which is vital for a consistent and professional brand image.

Lossy Compression is the better choice for social media images due to its efficiency in reducing file sizes, which is beneficial for quick data transmission and loading times.

You've read 0 of your 0 free revision notes

Get unlimited access

to absolutely everything:

  • Downloadable PDFs
  • Unlimited Revision Notes
  • Topic Questions
  • Past Papers
  • Model Answers
  • Videos (Maths and Science)

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Callum Davies

Author: Callum Davies

Callum is an experienced teacher of GCSE and A-Level Computer Science. He has 4 years of teaching experience and has detailed knowledge of how to achieve exam success, having marked for OCR A-Level. Callum is now a software engineer and regularly mentors new engineers.