---
title: "What is Compression (Brotli / Gzip)? Definition & Meaning"
url: https://www.pagespeedmatters.com/resources/glossary/compression
description: "Compression is the encoding of text-based responses (HTML, CSS, JavaScript, JSON, SVG) using an algorithm such as Brotli or Gzip so that the server..."
lang: en
---

PageSpeed Matters: https://www.pagespeedmatters.com/

See Plans & Pricing: https://www.pagespeedmatters.com/pricing

Image: Compression (Brotli / Gzip) (https://www.pagespeedmatters.com/__l5e/assets-v1/15d4b943-3379-4715-b23e-a330dc9030d3/gloss-hero-compression.png)

Share

Share on X: https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.pagespeedmatters.com%2Fresources%2Fglossary%2Fcompression&text=Compression%20(Brotli%20%2F%20Gzip)
Share on Facebook: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.pagespeedmatters.com%2Fresources%2Fglossary%2Fcompression
Share on LinkedIn: https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.pagespeedmatters.com%2Fresources%2Fglossary%2Fcompression
Share on Reddit: https://www.reddit.com/submit?url=https%3A%2F%2Fwww.pagespeedmatters.com%2Fresources%2Fglossary%2Fcompression&title=Compression%20(Brotli%20%2F%20Gzip)

## TL;DR

Compression is the encoding of text-based responses (HTML, CSS, JavaScript, JSON, SVG) using an algorithm such as Brotli or Gzip so that the server transmits a smaller payload that the browser decompresses on receipt.

## What is Compression (Brotli / Gzip)?

Learn more in our how to improve compression (https://www.pagespeedmatters.com/resources/guides/web-performance-optimization-complete-guide) guide, or work with us through our done-for-you speed optimization service (https://www.pagespeedmatters.com/services).

## How Compression (Brotli / Gzip) is Measured

The Content-Encoding response header indicates which algorithm is in use, and Lighthouse audits 'Enable text compression'.

## Related Terms

Glossary

### Browser Caching
https://www.pagespeedmatters.com/resources/glossary/caching

Glossary

### Time to First Byte (TTFB)
https://www.pagespeedmatters.com/resources/glossary/time-to-first-byte

Glossary

### Tree Shaking & Minification
https://www.pagespeedmatters.com/resources/glossary/minification-tree-shaking

Sources

- web.dev: Enable text compression: https://web.dev/articles/uses-text-compression

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "@type": "DefinedTerm",
    "name": "Compression (Brotli / Gzip)",
    "description": "Compression is the encoding of text-based responses (HTML, CSS, JavaScript, JSON, SVG) using an algorithm such as Brotli or Gzip so that the server transmits a smaller payload that the browser decompresses on receipt.",
    "url": "https://www.pagespeedmatters.com/resources/glossary/compression",
    "inDefinedTermSet": {
      "@type": "DefinedTermSet",
      "name": "Web Performance Glossary",
      "url": "https://www.pagespeedmatters.com/resources/glossary"
    }
  },
  {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://www.pagespeedmatters.com"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Resources",
        "item": "https://www.pagespeedmatters.com/resources"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Glossary",
        "item": "https://www.pagespeedmatters.com/resources/glossary"
      },
      {
        "@type": "ListItem",
        "position": 4,
        "name": "Compression (Brotli / Gzip)"
      }
    ]
  }
]
```