Class StandardCompressionOptions
java.lang.Object
io.netty.handler.codec.compression.StandardCompressionOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic BrotliOptionsbrotli()Default implementation ofBrotliOptionswithEncoder.Parameters.setQuality(int)set to 4 andEncoder.Parameters.setMode(Encoder.Mode)set toEncoder.Mode.TEXTstatic BrotliOptionsbrotli(int quality, int window, BrotliMode mode) Create a newBrotliOptionsstatic BrotliOptionsbrotli(com.aayushatharva.brotli4j.encoder.Encoder.Parameters parameters) Deprecated.static 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 SnappyOptionssnappy()Create a newSnappyOptionsstatic ZstdOptionszstd()Default implementation ofZstdOptionswith{compressionLevel(int)} set toZstdConstants.DEFAULT_COMPRESSION_LEVEL,ZstdConstants.DEFAULT_BLOCK_SIZE,ZstdConstants.DEFAULT_MAX_ENCODE_SIZEstatic ZstdOptionszstd(int compressionLevel, int blockSize, int maxEncodeSize) Create a newZstdOptions
-
Method Details
-
brotli
Default implementation ofBrotliOptionswithEncoder.Parameters.setQuality(int)set to 4 andEncoder.Parameters.setMode(Encoder.Mode)set toEncoder.Mode.TEXT -
brotli
@Deprecated public static BrotliOptions brotli(com.aayushatharva.brotli4j.encoder.Encoder.Parameters parameters) Deprecated.Create a newBrotliOptions- Parameters:
parameters-Encoder.ParametersInstance- Throws:
NullPointerException- IfEncoder.Parametersisnull
-
brotli
Create a newBrotliOptions- Parameters:
quality- Specifies the compression level.window- Specifies the size of the sliding window when compressing.mode- optimizes the compression algorithm based on the type of input data.- Throws:
NullPointerException- IfBrotliModeisnull
-
zstd
Default implementation ofZstdOptionswith{compressionLevel(int)} set toZstdConstants.DEFAULT_COMPRESSION_LEVEL,ZstdConstants.DEFAULT_BLOCK_SIZE,ZstdConstants.DEFAULT_MAX_ENCODE_SIZE -
zstd
Create a newZstdOptions- Parameters:
compressionLevel- specifies the level of the compressionblockSize- is used to calculate the compressionLevelmaxEncodeSize- specifies the size of the largest compressed object
-
snappy
Create a newSnappyOptions -
gzip
Default implementation ofGzipOptionswithcompressionLevel()set to 6,windowBits()set to 15 andmemLevel()set to 8. -
gzip
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
Default implementation ofDeflateOptionswithcompressionLevelset to 6,windowBitsset to 15 andmemLevelset to 8. -
deflate
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
-
brotli(int, int, BrotliMode)