What is Compression Algorithm?

Legal Definition
The mathematical way a compuer completes a task. It can be done with lossless way or the lossy way losing some size in the compression process.