Compressing a file means reducing its file size using a specific algorithm. It has the advantage of saving storage space and faster transmission. There are two main types of compression:
Lossless Compression: This method reduces file size without quality loss. Lossless compression replaces redundant data and patterns in a file with shorter codes or references and restores the change after the file is decompressed. That being said, files compressed with a lossless compression method will be reverted to their original forms after decompression.
However, lossless compression usually can't reduce as much file size as lossy compression. Common lossless compression formats include ZIP, gzip, and bzip2 for general data, PNG for images, and FLAC for audio.
Lossy Compression: This method reduces file size with quality loss. Lossy compression reduces file size by permanently removing information considered less important or undetectable to human eyes. A file compressed with a lossy method will lose quality though it's not usually noticeable.
It's commonly used for multimedia files like MP3s for audio and JPEGs for images.
If you want to compress a file on Mac without quality loss, try iBoysoft MagicMenu! It allows you to right-click a file to compress it, customize the compression level and set a password for the compressed file.