Gzip is a compression algorithm that shrinks text-based files, HTML, CSS, JavaScript, before a server sends them to a browser, by finding repeated patterns and strings and encoding them more efficiently. The browser decompresses the file on arrival, so the visitor sees the same content, just transferred in a fraction of the size.
It's typically enabled at the server level rather than something applied file by file, and the reduction can be substantial: text-heavy files often compress to a fifth or less of their original size, since HTML and CSS tend to be highly repetitive. Brotli, a newer compression algorithm with generally better compression ratios, has become the alternative worth checking for; most modern servers and CDNs support it, and it usually outperforms gzip on the same files, though gzip remains the safer universal fallback for older clients that don't support Brotli. Either way, compression is one of the simplest, most broadly applicable page speed wins available, usually a one-time server configuration rather than an ongoing effort.
