Package com.github.fmjsjx.libnetty.http
Class HttpContentCompressorFactory.Builder
java.lang.Object
com.github.fmjsjx.libnetty.http.HttpContentCompressorFactory.Builder
- Enclosing class:
- HttpContentCompressorFactory
Deprecated.
A builder to build
HttpContentCompressorFactorys.- Since:
- 1.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Deprecated.Creates a newHttpContentCompressorFactorywith the current settings.compressionLevel(int compressionLevel) Deprecated.Set the compression level.contentSizeThreshold(int contentSizeThreshold) Deprecated.Set the content size threshold.memLevel(int memLevel) Deprecated.Set the memory level, how much memory should be allocated for the internal compression state.windowBits(int windowBits) Deprecated.Set the window bits, the base two logarithm of the size of the history buffer.
-
Method Details
-
compressionLevel
Deprecated.Set the compression level.1yields the fastest compression and9yields the best compression.0means no compression. The default compression level is6.- Parameters:
compressionLevel- the compression level- Returns:
- this builder
-
windowBits
Deprecated.Set the window bits, the base two logarithm of the size of the history buffer. The value should be in the range9to15inclusive. Larger values result in better compression at the expense of memory usage. The default value is15- Parameters:
windowBits- the window bits- Returns:
- this builder
-
memLevel
Deprecated.Set the memory level, how much memory should be allocated for the internal compression state.1uses minimum memory and9uses maximum memory. Larger values result in better and faster compression at the expense of memory usage. The default value is8.- Parameters:
memLevel- the memory level- Returns:
- this builder
-
contentSizeThreshold
Deprecated.Set the content size threshold. The response body is compressed when the size of the response body exceeds the threshold. The value should be a non negative number.0will enable compression for all responses. The default value is1024.- Parameters:
contentSizeThreshold- the content size threshold- Returns:
- this builder
-
build
Deprecated.Creates a newHttpContentCompressorFactorywith the current settings.- Returns:
- a
HttpContentCompressorFactory
-