---
title: Gzip compression for HTTP responses
description: IDM uses the Jetty Gzip handler to compress HTTP responses. The default Gzip handler configuration, in conf/jetty.xml, is as follows:
component: pingidm
version: 7.2
page_id: pingidm:install-guide:gzip-compression
canonical_url: https://docs.pingidentity.com/pingidm/7.5/install-guide/gzip-compression.html
llms_txt: https://docs.pingidentity.com/pingidm/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
superseded_by: https://docs.pingidentity.com/pingidm/7.5/install-guide/gzip-compression.html
---

# Gzip compression for HTTP responses

IDM uses the Jetty Gzip handler to compress HTTP responses. The default Gzip handler configuration, in `conf/jetty.xml`, is as follows:

```xml
...
<Call name="insertHandler">
    <Arg>
        <!-- https://www.eclipse.org/jetty/documentation/9.4.x/gzip-filter.html -->
        <New id="GzipHandler" class="org.eclipse.jetty.server.handler.gzip.GzipHandler">
            <Set name="minGzipSize"><Property name="jetty.gzip.minGzipSize" default="2048"/></Set>
            <Set name="compressionLevel"><Property name="jetty.gzip.compressionLevel" default="-1"/></Set>
            <Set name="inflateBufferSize"><Property name="jetty.gzip.inflateBufferSize" default="0"/></Set>
            <Set name="syncFlush"><Property name="jetty.gzip.syncFlush" default="false" /></Set>
            <Set name="excludedAgentPatterns">
                <Array type="String">
                    <!-- IE 6 has known bugs related to GZIP compression -->
                    <Item><Property name="jetty.gzip.excludedUserAgent" default=".*MSIE.6\.0.*"/></Item>
                </Array>
            </Set>
            <Set name="includedMethodList"><Property name="jetty.gzip.includedMethodList" default="GET" /></Set>
            <Set name="excludedMethodList"><Property name="jetty.gzip.excludedMethodList" default="" /></Set>
        </New>
    </Arg>
</Call>
...
```

Adjust this configuration if the default does not suit your deployment. Configuration properties are as follows:

* `minGzipSize`

  Content is compressed only if the content length is unknown or is greater than the `minGzipSize`. By default, content is compressed only if the response is greater than 2048MB.

* `compressionLevel`

  The compression level (`1-9`, with `1` being the fastest compression speed but a lower compression ratio, and `9` being the highest compression ratio but lowest compression speed. The default configuration sets the compression level to `-1`, which indicates that the application should use the default. The default Gzip handler uses level `6`, favoring higher compression over speed.

* `inflateBufferSize`

  Number of bytes in the request decompression buffer. The default setting is `-1`, which disables this feature. Use this feature only if you want to compress large POST/PUT request payloads. Be aware that this setting exposes a potential [Zip bomb risk](https://en.wikipedia.org/wiki/Zip_bomb).

* `syncFlush`

  By default, this setting is `false`, which lets the deflater determine how much data to accumulate, before it produces output. This achieves the best compression. When `true`, this setting forces flushing of the buffer of data to compress. This can result in poor compression.

* `excludedAgentPatterns`

  A list of regex patterns for User-Agent names. Requests from these names should not be compressed.

* `includedMethodList`

  A list of HTTP methods to compress. By default, only GET requests are compressed.

* `excludedMethodList`

  A list of HTTP methods that should not be compressed.
