HttpMessage and an HttpContent in gzip or
deflate encoding while respecting the "Accept-Encoding" header.
If there is no matching encoding, no compression is done. For more
information on how this handler modifies the message, please refer to
HttpContentEncoder.
| Modifier and Type | Field and Description |
|---|---|
| private final BrotliOptions | |
| private final int | |
| private final int | |
| private final DeflateOptions | |
| private final Map | |
| private final GzipOptions | |
| private final boolean | |
| private final ZstdOptions |
| Access | Constructor and Description |
|---|---|
| public | HttpContentCompressor()
Creates a new handler with the default compression level (6), default window size (15) and default memory level (8). |
| public | HttpContentCompressor(int
1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.
Deprecated
Creates a new handler with the specified compression level.
|
| public | HttpContentCompressor(int
1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.The response body is compressed when the size of the response
body exceeds the threshold. The value should be a non negative
number. contentSizeThreshold)0 will enable compression for all responses.
Deprecated
Creates a new handler with the specified compression level, window size,
and memory level..
|
| public | HttpContentCompressor(CompressionOptions...
CompressionOptions or null if the default
should be used.Create a new |
| public | HttpContentCompressor(int
The response body is compressed when the size of the response
body exceeds the threshold. The value should be a non negative
number. contentSizeThreshold, CompressionOptions... 0 will enable compression for all responses.CompressionOptions or null
if the default should be used.Create a new |
| Modifier and Type | Method and Description |
|---|---|
| protected HttpContentEncoder. | beginEncode(HttpResponse
the http response httpResponse, String the value of the acceptEncoding)"Accept-Encoding" headerImplements abstract io. |
| protected String | |
| protected ZlibWrapper |
| brotliOptions | back to summary |
|---|---|
| private final BrotliOptions brotliOptions | |
| compressionLevel | back to summary |
|---|---|
| private final int compressionLevel | |
| contentSizeThreshold | back to summary |
|---|---|
| private final int contentSizeThreshold | |
| deflateOptions | back to summary |
|---|---|
| private final DeflateOptions deflateOptions | |
| factories | back to summary |
|---|---|
| private final Map<String, Supplier<? extends Compressor>> factories | |
| gzipOptions | back to summary |
|---|---|
| private final GzipOptions gzipOptions | |
| supportsCompressionOptions | back to summary |
|---|---|
| private final boolean supportsCompressionOptions | |
| zstdOptions | back to summary |
|---|---|
| private final ZstdOptions zstdOptions | |
| HttpContentCompressor | back to summary |
|---|---|
| public HttpContentCompressor() Creates a new handler with the default compression level (6), default window size (15) and default memory level (8). | |
| HttpContentCompressor | back to summary |
|---|---|
| public HttpContentCompressor(int compressionLevel)
Deprecated
Creates a new handler with the specified compression level.
| |
| HttpContentCompressor | back to summary |
|---|---|
| public HttpContentCompressor(int compressionLevel, int contentSizeThreshold)
Deprecated
Creates a new handler with the specified compression level, window size, and memory level..
| |
| HttpContentCompressor | back to summary |
|---|---|
| public HttpContentCompressor(CompressionOptions... compressionOptions) Create a new
| |
| HttpContentCompressor | back to summary |
|---|---|
| public HttpContentCompressor(int contentSizeThreshold, CompressionOptions... compressionOptions) Create a new
| |
| beginEncode | back to summary |
|---|---|
| protected HttpContentEncoder. Implements abstract io. Doc from io. Prepare to encode the HTTP message content.
| |
| determineEncoding | back to summary |
|---|---|
protected String determineEncoding(String acceptEncoding)
| |
| determineWrapper | back to summary |
|---|---|
| protected ZlibWrapper determineWrapper(String acceptEncoding)
Deprecated
| |