Technology reading / 01
Less space, same information.
A smaller file can preserve every detail—or make a deliberate trade. The difference is in the method.
General educational information
Patterns make room
Compression represents information using fewer bits. A lossless method lets a decoder reconstruct the original data exactly. Repeated patterns can be described more efficiently than writing out each occurrence. The useful question is whether the representation gets smaller once all the instructions needed to decode it are included.
Two different promises
Lossy compression takes another approach: it discards some information. This can be useful for images and other media when the result remains suitable for its purpose. Reopening the compressed file does not restore what was discarded. Keeping an original preserves the option to make a different choice later.
A transfer encoding can also compress a webpage while it travels. The browser decodes that response before displaying it. This is distinct from reducing the quality of an image within the page.
Read the whole trade
A smaller download may reduce transfer work, but encoding and decoding also require computation. Compatibility matters: the recipient needs to understand the chosen format. File size alone cannot tell you whether a method is appropriate.
For a hypothetical document archive, exact recovery might be essential. For a small preview image, a carefully chosen lossy copy might be sufficient. Decide what must survive before choosing how much to reduce.
Further reading: Cloudflare: Content compression