org.apache.tapestry5.services

## Interface ResponseCompressionAnalyzer

- All Known Implementing Classes:
    ResponseCompressionAnalyzerImpl

      public interface ResponseCompressionAnalyzer

  Used to determine if the client supports GZip compression of the response.
  Since:
    5.1.0.0
  See Also:
    `CompressionAnalyzer`, `SymbolConstants.GZIP_COMPRESSION_ENABLED`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isGZipEnabled(ContentType contentType)` Uses `CompressionAnalyzer` to determine if the content is compressable, but only if the request indicates the client supports compression.
    `boolean` | `isGZipSupported()` Checks the Accept-Encoding request header for a "gzip" token.

- - ### Method Detail

    - #### isGZipSupported

          boolean isGZipSupported()

      Checks the Accept-Encoding request header for a "gzip" token. Ensures that the protocol is not "HTTP/1.0", which does not correctly support GZip encoding (in older Internet Explorer browsers).
      Returns:
        true if gzip is supported by client

    - #### isGZipEnabled

          boolean isGZipEnabled(ContentType contentType)

      Uses `CompressionAnalyzer` to determine if the content is compressable, but only if the request indicates the client supports compression.
      Parameters:
        `contentType` -
      Returns:
        true if the content can be compressed for the current request
      Since:
        5.4

${project.version} - Copyright © 2003-2015 The Apache Software Foundation.