1.3 Data Storage and File Compression
1.3 Data Storage and File Compression
1.3 Data Storage and File Compression
Page 1 of 12
© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources
Bit b 1 or 0
Nibble 4b
Byte B 8B
Megabyte vs Mebibyte
1 kibibyte = 1024 bits - binary prefixes (to the power of 2)
1 kilobyte = 1000 bits - decimal prefixes (to the power of 10)
Page 2 of 12
© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources
When dealing with all units bigger than a byte we use multiples of 1024 (210)
For example, 2000 kibibytes in mebibytes would be 2000 / 1024 = 1.95 MiB and 2 tebibytes in Your notes
gibibytes would be 2 * 1024 = 2048 GiB
When dealing with bits and bytes the same process is used with the value 8 as there are 8 bits in a byte
For example, 24 bits in bytes would be 24 / 8 = 3 B and 10 bytes in bits would be 10 * 8 = 80 b
Unit
Byte
Mebibyte
Gibibyte
Tebibyte
Page 3 of 12
© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources
Example
Image Files
OR
Page 4 of 12
© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources
Image Files
Your notes
(Image width) x (Image height) x (Colour Depth)
Example
Sound Files
Page 5 of 12
© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources
Page 6 of 12
© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources
Compression
Your notes
The Need For Compression
What is compression?
Compression is reducing the the size of a file so that it takes up less space on secondary storage
The impact of compression is:
Less storage space required
Less bandwidth required
Shorter transmission time
Compression can be achieved using two methods, lossy and lossless
Lossy Compression
What is lossy compression?
Lossy compression is when data is lost in order to reduce the size on secondary storage
Lossy compression is irreversible
Lossy can greatly reduce the size of a file but at the expense of losing quality
Lossy is only suitable for data where reducing quality is acceptable, for example images, video and
sound
In photographs, lossy compression will try to group similar colours together, reducing the amount of
colours in the image without compromising the overall quality of the image
Page 7 of 12
© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources
Your notes
Page 8 of 12
© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources
Your notes
In the images above, lossy compression is applied to a photograph and dramatically reduces the file
size
Page 9 of 12
© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources
Data has been removed and the overall quality has been reduced, however it is acceptable as it is
difficult to visually see a difference
Your notes
Lossy compressed photographs take up less storage space which means you can store more and they
are quicker to share across a network
Lossless Compression
What is lossless compression?
Lossless compression is when data is encoded in order to reduce the size on secondary storage
Lossless compression is reversible, the file can be returned to its original state
Lossless can reduce the size of a file but not as dramatically as lossy
Lossless can be used on all data but is more suitable for data where a loss in quality is unacceptable,
for example documents
In a document, lossless compression algorithms such as run length encoding (RLE) can be used to
analyse the contents looking for patterns and repetition.
Page 10 of 12
© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources
Your notes
In the image above, lossless compression is automatically applied to document formats such as
DOCX and PDF with a different rate of success
When you open a lossless compressed document the decompression process reverses the
algorithms and returns the data back to its original state
Lossless compressed documents take up less storage space which means you can store more and
they are quicker to share across a network
WORKED EXAMPLE
An email is sent containing a sound file.
Lossy compression is used to compress the sound file.
Explain two reasons why using lossy compression is beneficial. [4]
How to answer this question
What are the differences between lossy and lossless?
Can you state two differences? [2 marks]
Can you say why each point is a benefit? [2 marks]
Answer
Page 11 of 12
© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources
Page 12 of 12
© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers