Purpose
The purpose of compression is to:
- reduce the size of files
- reduce download times
- reduce storage requirements
- make best use of bandwidth (in relation to prior point)
- given the fact that vast amounts of data are transmitted over the internet daily, efficient use of bandwidth can be critical
Methods
There are two methods of compression.
- lossy - results in a loss of some data when compressed
- reduces quality and file size
- suitable for images, video and audio
- lossless - results in no loss of data
- reduces file size
- suitable for executables and documents
Some files are not suitable for lossy compression, i.e., text files. They must instead be compressed using lossless.