Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

iftekhs's avatar
Level 13

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?

0 likes
3 replies
iftekhs's avatar
Level 13

@click Well, I use managed hosting server. Can you also explain to me what actually does it do? I mean what is it?

tykus's avatar

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!

1 like

Please or to participate in this conversation.