Compression is a reduction in size of a file. It is useful because files can be made smaller so can be sent and downloaded faster and take up less storage. A disadvantage is that while being compressed files can lose quality, they also have to be decompressed which takes time.
There are two types of compression. Lossy and lossless. Lossy compression is when some of the data is lost but the file size is smaller. Lossy cant be used on blocks of texts as when decompressed it would not make sense. Lossless is when the original file can be recreated so is a bit bigger than lossy.
eg. before and after compression with a block of text
…
