Top Description Constructors Methods
io.netty5.handler.codec.compression

public final Class StandardCompressionOptions

extends Object
Class Inheritance
Imports
com.aayushatharva.brotli4j.encoder.Encoder

Standard Compression Options for BrotliOptions, GzipOptions and DeflateOptions

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static BrotliOptions
public static BrotliOptions
brotli(Encoder.Parameters parameters)

Create a new BrotliOptions

public static DeflateOptions
deflate()

Default implementation of DeflateOptions with compressionLevel set to 6, windowBits set to 15 and memLevel set to 8.

public static DeflateOptions
deflate(int
1 yields the fastest compression and 9 yields the best compression. 0 means no compression. The default compression level is 6.
compressionLevel
)

Create a new DeflateOptions Instance

public static GzipOptions
gzip()

Default implementation of GzipOptions with compressionLevel() set to 6, windowBits() set to 15 and memLevel() set to 8.

public static GzipOptions
gzip(int
1 yields the fastest compression and 9 yields the best compression. 0 means no compression. The default compression level is 6.
compressionLevel
)

Create a new GzipOptions Instance

public static ZstdOptions
public static ZstdOptions
zstd(int
specifies the level of the compression
compressionLevel
,
int
is used to calculate the compressionLevel
blockSize
,
int
specifies the size of the largest compressed object
maxEncodeSize
)

Create a new ZstdOptions

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StandardCompressionOptionsback to summary
private StandardCompressionOptions()

Method Detail

brotliback to summary
public static BrotliOptions brotli()

Default implementation of BrotliOptions with Encoder.Parameters#setQuality(int) set to 4 and Encoder.Parameters#setMode(Encoder.Mode) set to Encoder.Mode#TEXT

brotliback to summary
public static BrotliOptions brotli(Encoder.Parameters parameters)

Create a new BrotliOptions

Parameters
parameters:Encoder.Parameters

Encoder.Parameters Instance

Exceptions
NullPointerException:
If Encoder.Parameters is null
deflateback to summary
public static DeflateOptions deflate()

Default implementation of DeflateOptions with compressionLevel set to 6, windowBits set to 15 and memLevel set to 8.

deflateback to summary
public static DeflateOptions deflate(int compressionLevel)

Create a new DeflateOptions Instance

Parameters
compressionLevel:int

1 yields the fastest compression and 9 yields the best compression. 0 means no compression. The default compression level is 6.

gzipback to summary
public static GzipOptions gzip()

Default implementation of GzipOptions with compressionLevel() set to 6, windowBits() set to 15 and memLevel() set to 8.

gzipback to summary
public static GzipOptions gzip(int compressionLevel)

Create a new GzipOptions Instance

Parameters
compressionLevel:int

1 yields the fastest compression and 9 yields the best compression. 0 means no compression. The default compression level is 6.

zstdback to summary
public static ZstdOptions zstd()

Default implementation of ZstdOptions with{compressionLevel(int)} set to ZstdConstants#DEFAULT_COMPRESSION_LEVEL,ZstdConstants#DEFAULT_BLOCK_SIZE, ZstdConstants#MAX_BLOCK_SIZE

zstdback to summary
public static ZstdOptions zstd(int compressionLevel, int blockSize, int maxEncodeSize)

Create a new ZstdOptions

Parameters
compressionLevel:int

specifies the level of the compression

blockSize:int

is used to calculate the compressionLevel

maxEncodeSize:int

specifies the size of the largest compressed object