- java.lang.Object
-
- io.netty5.handler.codec.compression.StandardCompressionOptions
-
public final class StandardCompressionOptions extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BrotliOptionsbrotli()Default implementation ofBrotliOptionswithEncoder.Parameters.setQuality(int)set to 4 andEncoder.Parameters.setMode(Encoder.Mode)set toEncoder.Mode.TEXTstatic BrotliOptionsbrotli(com.aayushatharva.brotli4j.encoder.Encoder.Parameters parameters)Create a newBrotliOptionsstatic DeflateOptionsdeflate()Default implementation ofDeflateOptionswithcompressionLevelset to 6,windowBitsset to 15 andmemLevelset to 8.static DeflateOptionsdeflate(int compressionLevel, int windowBits, int memLevel)Create a newDeflateOptionsInstancestatic GzipOptionsgzip()Default implementation ofGzipOptionswithcompressionLevel()set to 6,windowBits()set to 15 andmemLevel()set to 8.static GzipOptionsgzip(int compressionLevel, int windowBits, int memLevel)Create a newGzipOptionsInstancestatic ZstdOptionszstd()Default implementation ofZstdOptionswith{compressionLevel(int)} set toZstdConstants.DEFAULT_COMPRESSION_LEVEL,ZstdConstants.DEFAULT_BLOCK_SIZE,ZstdConstants.MAX_BLOCK_SIZEstatic ZstdOptionszstd(int compressionLevel, int blockSize, int maxEncodeSize)Create a newZstdOptions
-
-
-
Method Detail
-
brotli
public static BrotliOptions brotli()
Default implementation ofBrotliOptionswithEncoder.Parameters.setQuality(int)set to 4 andEncoder.Parameters.setMode(Encoder.Mode)set toEncoder.Mode.TEXT
-
brotli
public static BrotliOptions brotli(com.aayushatharva.brotli4j.encoder.Encoder.Parameters parameters)
Create a newBrotliOptions- Parameters:
parameters-Encoder.ParametersInstance- Throws:
NullPointerException- IfEncoder.Parametersisnull
-
zstd
public static ZstdOptions zstd()
Default implementation ofZstdOptionswith{compressionLevel(int)} set toZstdConstants.DEFAULT_COMPRESSION_LEVEL,ZstdConstants.DEFAULT_BLOCK_SIZE,ZstdConstants.MAX_BLOCK_SIZE
-
zstd
public static ZstdOptions zstd(int compressionLevel, int blockSize, int maxEncodeSize)
Create a newZstdOptions- Parameters:
blockSize- is used to calculate the compressionLevelmaxEncodeSize- specifies the size of the largest compressed objectcompressionLevel- specifies the level of the compression
-
gzip
public static GzipOptions gzip()
Default implementation ofGzipOptionswithcompressionLevel()set to 6,windowBits()set to 15 andmemLevel()set to 8.
-
gzip
public static GzipOptions gzip(int compressionLevel, int windowBits, int memLevel)
Create a newGzipOptionsInstance- Parameters:
compressionLevel-1yields the fastest compression and9yields the best compression.0means no compression. The default compression level is6.windowBits- 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.memLevel- 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
-
deflate
public static DeflateOptions deflate()
Default implementation ofDeflateOptionswithcompressionLevelset to 6,windowBitsset to 15 andmemLevelset to 8.
-
deflate
public static DeflateOptions deflate(int compressionLevel, int windowBits, int memLevel)
Create a newDeflateOptionsInstance- Parameters:
compressionLevel-1yields the fastest compression and9yields the best compression.0means no compression. The default compression level is6.windowBits- 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.memLevel- 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
-
-