Compression is the process of making a file size smaller. This may be advantageous as it allows more data to be stored on the disk, and files may also be transferred more quickly. There are two primary methods that are used to compress files stored on a computer system; these are lossy and lossless.