Data Representation: Data Storage And Compression: Understand How Files Are Compressed Using Lossy And Lossless Compression Methods (Copy)
| Concept | File Compression Methods |
|---|---|
| Compression | Reducing file size by removing or encoding data efficiently |
| Aim | Save storage and speed up transmission |
| Categories | Lossy and Lossless |
| Lossless Compression | Explanation |
|---|---|
| Data Loss | No data is lost |
| Reversibility | Original file can be fully restored |
| Method | Removes redundancy and repetition |
| Best For | Text files, programs, spreadsheets |
| Lossless Techniques | How It Works |
|---|---|
| Run-Length Encoding (RLE) | Replaces repeated values with one value + count |
| Dictionary-Based | Replaces repeated patterns with shorter codes |
| Huffman Coding | Uses shorter codes for frequent data |
Written and Compiled By Sir Hunain Zia (AYLOTI), World Record Holder With 154 Total A Grades, 7 Distinctions and 11 World Records For Educate A Change O Level And IGCSE Computer Science Full Scale Course
| Lossy Compression | Explanation |
|---|---|
| Data Loss | Permanent loss of some data |
| Reversibility | Original file cannot be recovered |
| Method | Removes data humans are less likely to notice |
| Best For | Images, sound, video |
| Lossy Techniques | How It Works |
|---|---|
| Image Compression | Removes subtle colour detail |
| Audio Compression | Removes inaudible frequencies |
| Video Compression | Removes repeated frames and details |
Written and Compiled By Sir Hunain Zia (AYLOTI), World Record Holder With 154 Total A Grades, 7 Distinctions and 11 World Records For Educate A Change O Level And IGCSE Computer Science Full Scale Course
| Lossy vs Lossless | Lossless | Lossy |
|---|---|---|
| Data Loss | None | Some |
| File Size | Reduced | Greatly reduced |
| Quality | Same | Reduced |
| Reversible | Yes | No |
| Common File Formats | Compression Type |
|---|---|
| TXT | Lossless |
| ZIP | Lossless |
| PNG | Lossless |
| JPEG | Lossy |
| MP3 | Lossy |
| MP4 | Lossy |
Written and Compiled By Sir Hunain Zia (AYLOTI), World Record Holder With 154 Total A Grades, 7 Distinctions and 11 World Records For Educate A Change O Level And IGCSE Computer Science Full Scale Course
| Why Choose Lossless | Reason |
|---|---|
| Accuracy Required | No information loss |
| Editing Needed | Data integrity preserved |
| Programs & Code | Must remain exact |
| Why Choose Lossy | Reason |
|---|---|
| Much Smaller Files | Efficient storage |
| Streaming | Faster loading |
| Multimedia | Quality loss acceptable |
Written and Compiled By Sir Hunain Zia (AYLOTI), World Record Holder With 154 Total A Grades, 7 Distinctions and 11 World Records For Educate A Change O Level And IGCSE Computer Science Full Scale Course
| Common Examiner Traps | How To Avoid |
|---|---|
| Saying all compression loses data | Mention lossless |
| Mixing file types | Match format to method |
| Vague explanations | State how data is removed |
| Forgetting examples | Quote formats |
| One-Line Summary | Exam-Perfect Statement |
|---|---|
| Lossless Compression | Reduces size with no data loss |
| Lossy Compression | Removes unnoticeable data |
| Choice | Depends on accuracy vs size |
Written and Compiled By Sir Hunain Zia (AYLOTI), World Record Holder With 154 Total A Grades, 7 Distinctions and 11 World Records For Educate A Change O Level And IGCSE Computer Science Full Scale Course
