public final HttpServer compress ( int minResponseSize ) { if ( minResponseSize < 0 ) { throw new IllegalArgumentException ( "minResponseSize must be positive" ) ; } return tcpConfiguration ( tcp -> tcp . bootstrap ( b -> HttpServerConfiguration . compressSize ( b , minResponseSize ) ) ) ; }
Enable GZip response compression if the client request presents accept encoding headers AND the response reaches a minimum threshold