What is text compression and how should i implement it?
Hi, I ran google page speed on my site and it showed me this -> Text-based resources should be served with compression (gzip, deflate, or brotli) to minimize total network bytes. What does that actually mean and how can I implement this?
Compression is a technique to transmit / store fewer bytes, making savings in bandwidth and/or disk.
There are two different families of compression algorithm lossy and lossless which relates to data loss during compression/decompression - a lossy compression algorithm cannot restore the original because some data is permanently discarded. This is useful with graphics, audio, video and images because we don't perceive the loss. Whereas lossless compression allows the original data to be restored - important for text!