ZlibUtil Class — netty Architecture
Architecture documentation for the ZlibUtil class in ZlibUtil.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0f9a5fa7_af39_95f6_598f_87e762351966["ZlibUtil"] 10970854_f4be_28d2_6f9a_bf23bcc70845["ZlibUtil.java"] 0f9a5fa7_af39_95f6_598f_87e762351966 -->|defined in| 10970854_f4be_28d2_6f9a_bf23bcc70845 cfd7b65e_9663_987d_0a8e_7883ac9d97b0["fail()"] 0f9a5fa7_af39_95f6_598f_87e762351966 -->|method| cfd7b65e_9663_987d_0a8e_7883ac9d97b0 688f7fc8_d83d_3fc7_cb2e_d584b624251c["DecompressionException()"] 0f9a5fa7_af39_95f6_598f_87e762351966 -->|method| 688f7fc8_d83d_3fc7_cb2e_d584b624251c 600329aa_d5f3_1815_8b77_9c6f17c62c77["CompressionException()"] 0f9a5fa7_af39_95f6_598f_87e762351966 -->|method| 600329aa_d5f3_1815_8b77_9c6f17c62c77 1df1b9cf_bff0_b90e_4f7c_82277172a2e2["convertWrapperType()"] 0f9a5fa7_af39_95f6_598f_87e762351966 -->|method| 1df1b9cf_bff0_b90e_4f7c_82277172a2e2 acf59180_35c8_5cbf_2be9_20538d5b8a07["wrapperOverhead()"] 0f9a5fa7_af39_95f6_598f_87e762351966 -->|method| acf59180_35c8_5cbf_2be9_20538d5b8a07 9540b746_e859_d78c_a486_84ae286659de["ZlibUtil()"] 0f9a5fa7_af39_95f6_598f_87e762351966 -->|method| 9540b746_e859_d78c_a486_84ae286659de
Relationship Graph
Source Code
codec-compression/src/main/java/io/netty/handler/codec/compression/ZlibUtil.java lines 25–74
final class ZlibUtil {
static void fail(Inflater z, String message, int resultCode) {
throw inflaterException(z, message, resultCode);
}
static void fail(Deflater z, String message, int resultCode) {
throw deflaterException(z, message, resultCode);
}
static DecompressionException inflaterException(Inflater z, String message, int resultCode) {
return new DecompressionException(message + " (" + resultCode + ')' + (z.msg != null? ": " + z.msg : ""));
}
static CompressionException deflaterException(Deflater z, String message, int resultCode) {
return new CompressionException(message + " (" + resultCode + ')' + (z.msg != null? ": " + z.msg : ""));
}
static JZlib.WrapperType convertWrapperType(ZlibWrapper wrapper) {
switch (wrapper) {
case NONE:
return JZlib.W_NONE;
case ZLIB:
return JZlib.W_ZLIB;
case GZIP:
return JZlib.W_GZIP;
case ZLIB_OR_NONE:
return JZlib.W_ANY;
default:
throw new Error("Unexpected wrapper type: " + wrapper);
}
}
static int wrapperOverhead(ZlibWrapper wrapper) {
switch (wrapper) {
case NONE:
return 0;
case ZLIB:
case ZLIB_OR_NONE:
return 2;
case GZIP:
return 10;
default:
throw new Error("Unexpected wrapper type: " + wrapper);
}
}
private ZlibUtil() {
}
}
Source
Frequently Asked Questions
What is the ZlibUtil class?
ZlibUtil is a class in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/ZlibUtil.java.
Where is ZlibUtil defined?
ZlibUtil is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/ZlibUtil.java at line 25.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free