The two approaches we discussed, removing redundancies and using more compact representations, are often combined, and underlie almost all lossless compressed file formats, like GIF, PNG, PDF and ZIP files.
As the quality of an image decreases from 100% to 0%, the amount of file compression increases, thereby decreasing the amount of space the image file takes up.