write() — netty Function Reference
Architecture documentation for the write() function in Bzip2BlockCompressor.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 9c11989a_f32b_4f73_9dbc_19da6668a445["write()"] 14ecc34c_1aa7_b25b_4492_69c298ece54c["Bzip2BlockCompressor"] 9c11989a_f32b_4f73_9dbc_19da6668a445 -->|defined in| 14ecc34c_1aa7_b25b_4492_69c298ece54c e8b3e716_b5f2_37ba_914c_38a5b70587b6["Bzip2BlockCompressor()"] e8b3e716_b5f2_37ba_914c_38a5b70587b6 -->|calls| 9c11989a_f32b_4f73_9dbc_19da6668a445 531fad03_b1f1_8ad1_160b_6f41129f0f30["writeRun()"] 9c11989a_f32b_4f73_9dbc_19da6668a445 -->|calls| 531fad03_b1f1_8ad1_160b_6f41129f0f30 style 9c11989a_f32b_4f73_9dbc_19da6668a445 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2BlockCompressor.java lines 183–207
boolean write(final int value) {
if (blockLength > blockLengthLimit) {
return false;
}
final int rleCurrentValue = this.rleCurrentValue;
final int rleLength = this.rleLength;
if (rleLength == 0) {
this.rleCurrentValue = value;
this.rleLength = 1;
} else if (rleCurrentValue != value) {
// This path commits us to write 6 bytes - one RLE run (5 bytes) plus one extra
writeRun(rleCurrentValue & 0xff, rleLength);
this.rleCurrentValue = value;
this.rleLength = 1;
} else {
if (rleLength == 254) {
writeRun(rleCurrentValue & 0xff, 255);
this.rleLength = 0;
} else {
this.rleLength = rleLength + 1;
}
}
return true;
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does write() do?
write() is a function in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2BlockCompressor.java.
Where is write() defined?
write() is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2BlockCompressor.java at line 183.
What does write() call?
write() calls 1 function(s): writeRun.
What calls write()?
write() is called by 1 function(s): Bzip2BlockCompressor.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free