ZstdOptions Class — netty Architecture
Architecture documentation for the ZstdOptions class in ZstdOptions.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c53ea870_fdd1_9e09_5e8d_6b14bb7fbab1["ZstdOptions"] dde46c15_a794_4136_2db5_91787a94fe56["ZstdOptions.java"] c53ea870_fdd1_9e09_5e8d_6b14bb7fbab1 -->|defined in| dde46c15_a794_4136_2db5_91787a94fe56 fd67a70e_134e_82d7_85ca_b74f9625deac["ZstdOptions()"] c53ea870_fdd1_9e09_5e8d_6b14bb7fbab1 -->|method| fd67a70e_134e_82d7_85ca_b74f9625deac 71fae592_5e62_3a4f_9b82_36dba4c577a7["compressionLevel()"] c53ea870_fdd1_9e09_5e8d_6b14bb7fbab1 -->|method| 71fae592_5e62_3a4f_9b82_36dba4c577a7 1cc75c41_34b6_ebe8_eb0d_e93b15cb1ec5["blockSize()"] c53ea870_fdd1_9e09_5e8d_6b14bb7fbab1 -->|method| 1cc75c41_34b6_ebe8_eb0d_e93b15cb1ec5 f4593df7_f2b3_f8c3_4d42_6c79fa782f74["maxEncodeSize()"] c53ea870_fdd1_9e09_5e8d_6b14bb7fbab1 -->|method| f4593df7_f2b3_f8c3_4d42_6c79fa782f74
Relationship Graph
Source Code
codec-compression/src/main/java/io/netty/handler/codec/compression/ZstdOptions.java lines 30–76
public class ZstdOptions implements CompressionOptions {
private final int blockSize;
private final int compressionLevel;
private final int maxEncodeSize;
/**
* Default implementation of {@link ZstdOptions} with{compressionLevel(int)} set to
* {@link ZstdConstants#DEFAULT_COMPRESSION_LEVEL},{@link ZstdConstants#DEFAULT_BLOCK_SIZE},
* {@link ZstdConstants#DEFAULT_MAX_ENCODE_SIZE}
*/
static final ZstdOptions DEFAULT = new ZstdOptions(DEFAULT_COMPRESSION_LEVEL, DEFAULT_BLOCK_SIZE,
DEFAULT_MAX_ENCODE_SIZE);
/**
* Create a new {@link ZstdOptions}
*
* @param blockSize
* is used to calculate the compressionLevel
* @param maxEncodeSize
* specifies the size of the largest compressed object
* @param compressionLevel
* specifies the level of the compression
*/
ZstdOptions(int compressionLevel, int blockSize, int maxEncodeSize) {
if (!Zstd.isAvailable()) {
throw new IllegalStateException("zstd-jni is not available", Zstd.cause());
}
this.compressionLevel = ObjectUtil.checkInRange(compressionLevel,
MIN_COMPRESSION_LEVEL, MAX_COMPRESSION_LEVEL, "compressionLevel");
this.blockSize = ObjectUtil.checkPositive(blockSize, "blockSize");
this.maxEncodeSize = ObjectUtil.checkPositive(maxEncodeSize, "maxEncodeSize");
}
public int compressionLevel() {
return compressionLevel;
}
public int blockSize() {
return blockSize;
}
public int maxEncodeSize() {
return maxEncodeSize;
}
}
Source
Frequently Asked Questions
What is the ZstdOptions class?
ZstdOptions is a class in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/ZstdOptions.java.
Where is ZstdOptions defined?
ZstdOptions is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/ZstdOptions.java at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free