Compression is a way to make files take up less space by indexing and referencing common elements of the data. Compression may either be lossless or lossy.