Computer Science : S1 : L10 : Data Storage and Compression
A Bit = 1
A Nibble = 4
A Byte = 8
Name | Number of Byte | Denary Value |
Bit | - | 1 bit |
Nibble | - | 4 bit |
Byte | - | 8 |
Kibibyte(KiB) | 2^10 | 1024 |
Mebibyte(MiB) | 2^20 | 1048576 |
Gibibyte(GiB) | 2^30 | 1073741825 |
Tebibyte(TiB) | 2^40 | 1099511627776 |
Pebibyte(PiB) | 2^50 | 1125899906842624 |
Exbibyte(EiB) | 2^60 | 115291504606846976 |
Image size :
Find total number of pixels
Times the past number by colour depth
Divide by 8 to convert to byte
Convert everything into byte
Find Storage capacity and convert to byte
Divide memory stick size by file size
Sound File :
Sample size = Sample rate(Hz) x Sample resolution x Length of sample
Find the size of the sample
Multiply by two (Depends on no. of channel)
Divide by 8 to find the number of bytes
Find Storage Capacity and convert to byte
Divide Bytes by Files Size(Storage)
Data Compression
Save Storage Space
Reduce time taken to stream
Reduce time to upload
Reduce File Size
Lossy File Compression :
It eliminates unnecessary data but the original file can never be reconstructed and that data has been lost forever
Lossless File Compression :
The data can be lost but it can be reconstructed
Run-Length Encoding is a lossless compression method. This is used when data is redundant so the programmes it into a single data value. The cons to this are you cannot see the original data after the method has been performed and you have to decode it yet it is retrievable. Its useful in black and white images as there are alot of redundant sections but it is not very helpful with full colour images with alot of colour depth as there won’t be many redundant sections
Explain what is meant by the term bandwidth
Bandwidth is the maximum capacity of data that can be transferred across a certain path
Why do compressed files use less bandwidth?
Compressed Files use less bandwidth as there is less data being transferred so less bandwidth is needed
Explain how lossy file compression works with MP3 and MP4 files
Lossy file compression can work with MP3 and MP4 files by reducing the quality and removing useless sound waves.
Explain how lossy file compression works with JPEG files
An algorithm scans image files and reduces their size by discarding information considered less important or undetectable to the human eye.
A camera has an array of 2048 by 2048 pixels and uses a colour depth of 16. Find the size of an image taken by this camera in MiB?
Run-Length Encoding
Run-Length Encoding is a lossless compression method. This is used when data is redundant so the programmes it into a single data value. The cons to this are you cannot see the original data after the method has been performed and you have to decode it yet it is retrievable. Its useful in black and white images as there are alot of redundant sections but it is not very helpful with full colour images with alot of colour depth as there won’t be many redundant sections