ByteBuf() — netty Function Reference
Architecture documentation for the ByteBuf() function in LzmaFrameEncoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 742d8c84_dfbd_47ad_7d52_aa1e1a7180a9["ByteBuf()"] 12df736e_94b1_ebf9_17a3_db9629d378d2["LzmaFrameEncoderTest"] 742d8c84_dfbd_47ad_7d52_aa1e1a7180a9 -->|defined in| 12df736e_94b1_ebf9_17a3_db9629d378d2 style 742d8c84_dfbd_47ad_7d52_aa1e1a7180a9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-compression/src/test/java/io/netty/handler/codec/compression/LzmaFrameEncoderTest.java lines 81–100
@Override
protected ByteBuf decompress(ByteBuf compressed, int originalLength) throws Exception {
byte[] decompressed = new byte[originalLength];
try (InputStream is = new ByteBufInputStream(compressed, true);
LzmaInputStream lzmaIs = new LzmaInputStream(is, new Decoder())) {
int remaining = originalLength;
while (remaining > 0) {
int read = lzmaIs.read(decompressed, originalLength - remaining, remaining);
if (read > 0) {
remaining -= read;
} else {
break;
}
}
assertEquals(-1, lzmaIs.read());
}
return Unpooled.wrappedBuffer(decompressed);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does ByteBuf() do?
ByteBuf() is a function in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/LzmaFrameEncoderTest.java.
Where is ByteBuf() defined?
ByteBuf() is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/LzmaFrameEncoderTest.java at line 81.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free