Data compression is when we make files smaller, while trying to make the compressed file as true to the original as possible
Compressing files has many uses:
Smaller files take up less storage space on a device
Streaming and downloading files from the internet is quicker as they take up less bandwidth
It allows web pages to load more quickly in web browsers
Email services normally have restrictions on the size of attachment you can send- compressing the file allows you to send the same content with a much smaller file size
Lossy compression works by permanently removing data from the file- this limits the number of bits the file needs and so reduces it size
Lossless compression uses an algorithm that identifies repeated data and leaves it out, instead notes how many times the data is repeated in order to reinstate that data when uncompressed
Advantages of lossy compression:
Greatly reduced file size, meaning more files can be stored
Lossy files take up less bandwidth so can be downloaded and streamed more quickly
Commonly used- lots of software can read lossy files
Disadvantages of lossy compression:
Loses data- the file can't be turned back into the original
Can't be used on text or software files as these files need to retain all the information of the original
Worse quality than the original. But, this loss in quality is normally unnoticeable
Advantages of lossless compression:
Data is only removed temporarily so there is no reduction in quality- the compressed file should look or sound like the original
Can be decompressed- turned back into the original
Can be used on text and software files
Disadvantages of lossless compression:
Only a slightreduction in file size, so still take up quite a bit of space