In images with large areas of repeating colour, instead of storing every pixel, we can store the binary for the colour followed by the number of pixels in a row
Some types of files like text documents and executable code must be compressed without any loss of data, so we use lossless compression for these files
Lossy compression: Some data is lost and cannot be recovered, greatly reducing the file size and reducing the quality of the image/sound. Suitable for images, sound, and video, but not for text and executable files
Lossless compression: None of the data is lost, it is encoded differently and can be turned back into the original format. Can be used on all types of data, but is usually less effective than lossy compression at reducing file size. Most suitable for documents and executable files