compression
Encoding data in fewer bytes by removing repetition, so it takes less space and less time to send.
In more detail
Lossless compression, such as gzip and Brotli, gives back the exact original when decompressed. It trades CPU time for smaller payloads, and text compresses much better than already-compressed images.
Related terms
- gzip — The command that compresses a single file and replaces it with a smaller .gz version; gunzip reverses it.
- Brotli — A compression format designed by Google that usually shrinks text more than gzip, at the cost of slower compression at high quality settings.
- DEFLATE — The compression algorithm inside gzip and zip files, which replaces repeated byte sequences with short references to earlier ones.
- bandwidth — How much data a network connection can carry per second, and by extension the amount of data a request or response uses up.
Taught in
- Native Compression: node:zlib & Streaming Codecs — Node.js Internals & Backend Services