We can also throw away coefficients that are close to zero without significantly distorting the image. We can then encode the remaining coefficients and transmit them along with the overall average value. Of course, a slightly more complex technique will be used in real-world applications. The wavelet function, for example, will use a much fancier version of averaging and differencing that operates on more than two pixels at a time. But the basic ideas remain the same.
Several considerations are important when selecting a compression algorithm.
The most obvious is space saved, and wavelets give consistently better results than other methods. Just as important is the time required for encoding and decoding. While all compression algorithms will perform better if they have more time, wave-lets with encoding times only about twice the decoding time achieve superb results. Compare this with fractal compression, which decompresses quickly but requires Herculean effort to compress it. This makes wavelets particularly advantageous for applications such as live video, in which we need to provide compression on the fly.