Why is compression used?
To reduce file size so data uses less storage, transfers faster, and loads more quickly — especially important for mobile devices, limited bandwidth, and internet buffering.
What is lossless compression?
A method that reduces file size without losing any data, allowing the original file to be perfectly reconstructed.
When is lossless compression used?
When accuracy is essential — text files, program files, spreadsheets, and some image formats (e.g., PNG)
What is lossy compression?
A method that removes non‑essential data to reduce file size, resulting in some loss of quality.
When is lossy compression used?
For media where perfect accuracy isn’t required — images (JPEG), audio (MP3), video (MP4).
What are the effects of lossy compression on images?
Blurring, blocky artefacts, reduced detail, and distortion — but much smaller file sizes.
What is the main advantage of lossy compression?
Dramatically smaller file sizes compared to lossless methods
What is the main disadvantage of lossy compression?
The original file cannot be perfectly restored; quality is permanently reduced.
Why is compression especially important for the internet?
It speeds up page loading, reduces bandwidth usage, and improves performance on slow connections.
Why is lossy compression effective for sound and video?
Because the human ear and eye cannot detect small changes, so non‑essential data can be removed without noticeably affecting quality.
What is the key idea behind lossless compression?
It finds patterns in the data and stores those patterns instead of the raw data, allowing perfect reconstruction.
Why does lossless compression produce larger files than lossy?
Because it keeps all the original information — nothing is permanently removed.
Give an example of when lossless compression is used.
Zipped folders, text documents, PNG images, and PDFs that must remain identical to the original.
Give an example of when lossy compression is used.
Website images (JPEG), MP3 audio, MP4 video.
What is Run Length Encoding (RLE)?
A lossless compression method that stores the value and how many times it repeats instead of storing each item individually.
Why does RLE work well on some images?
Because many images (especially simple or pixel‑block images) contain long runs of identical colours.
What does RLE store for each run?
Why is RLE less effective on detailed photographs?
Because natural images rarely have long runs of identical pixels, so compression is minimal.
What type of compression is RLE?
Lossless — the original data can be perfectly reconstructed.
What is dictionary‑based compression?
A lossless compression method that replaces repeated words or patterns with shorter binary codes stored in a dictionary.
How does dictionary‑based compression reduce file size?
By storing each repeated word once in a dictionary and referencing it with a short code instead of writing the full word each time.
What does the dictionary contain?
Why is dictionary‑based compression effective?
Natural language contains many repeated words, so replacing them with short codes saves significant space.
Is dictionary‑based compression lossy or lossless?
Lossless — the original text can be perfectly reconstructed.