files/en-us/glossary/lossless_compression/index.md
Lossless compression is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data. Lossless compression methods are reversible. Examples of lossless compression include {{glossary("GZip_compression", "gzip")}}, {{glossary("Brotli_compression", "brotli")}}, {{glossary("Zstandard compression", "Zstandard")}}, {{glossary("WebP")}}, and {{glossary("PNG")}}.
{{glossary("Lossy compression")}}, on the other hand, uses inexact approximations by discarding some data from the original file, making it an irreversible compression method. Compression methods such as {{glossary("WebP")}} are capable of both lossy and lossless compression depending on the compression level or the options you want to use during encoding.