Class HttpContentCompressorFactory.Builder

java.lang.Object
com.github.fmjsjx.libnetty.http.HttpContentCompressorFactory.Builder
Enclosing class:
HttpContentCompressorFactory

@Deprecated public static class HttpContentCompressorFactory.Builder extends Object
Deprecated.
A builder to build HttpContentCompressorFactorys.
Since:
1.1
See Also:
  • Method Details

    • compressionLevel

      public HttpContentCompressorFactory.Builder compressionLevel(int compressionLevel)
      Deprecated.
      Set the compression level. 1 yields the fastest compression and 9 yields the best compression. 0 means no compression. The default compression level is 6.
      Parameters:
      compressionLevel - the compression level
      Returns:
      this builder
    • windowBits

      public HttpContentCompressorFactory.Builder windowBits(int windowBits)
      Deprecated.
      Set the window bits, the base two logarithm of the size of the history buffer. The value should be in the range 9 to 15 inclusive. Larger values result in better compression at the expense of memory usage. The default value is 15
      Parameters:
      windowBits - the window bits
      Returns:
      this builder
    • memLevel

      public HttpContentCompressorFactory.Builder memLevel(int memLevel)
      Deprecated.
      Set the memory level, how much memory should be allocated for the internal compression state. 1 uses minimum memory and 9 uses maximum memory. Larger values result in better and faster compression at the expense of memory usage. The default value is 8.
      Parameters:
      memLevel - the memory level
      Returns:
      this builder
    • contentSizeThreshold

      public HttpContentCompressorFactory.Builder contentSizeThreshold(int 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. 0 will enable compression for all responses. The default value is 1024.
      Parameters:
      contentSizeThreshold - the content size threshold
      Returns:
      this builder
    • build

      Deprecated.
      Creates a new HttpContentCompressorFactory with the current settings.
      Returns:
      a HttpContentCompressorFactory