Class StandardCompressionOptions
- java.lang.Object
-
- io.netty.handler.codec.compression.StandardCompressionOptions
-
public final class StandardCompressionOptions extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated 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(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.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
@Deprecated public static BrotliOptions brotli(com.aayushatharva.brotli4j.encoder.Encoder.Parameters parameters)
Deprecated.Create a newBrotliOptions- Parameters:
parameters-Encoder.ParametersInstance- Throws:
java.lang.NullPointerException- IfEncoder.Parametersisnull
-
brotli
public static BrotliOptions brotli(int quality, int window, BrotliMode mode)
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:
java.lang.NullPointerException- IfBrotliModeisnull
-
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
-
snappy
public static SnappyOptions snappy()
Create a newSnappyOptions
-
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
-
-