testCompressionOfBatchedFlow() — netty Function Reference
Architecture documentation for the testCompressionOfBatchedFlow() function in LzmaFrameEncoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 595e3ace_50b6_3a6a_b693_02e9dc95a939["testCompressionOfBatchedFlow()"] 12df736e_94b1_ebf9_17a3_db9629d378d2["LzmaFrameEncoderTest"] 595e3ace_50b6_3a6a_b693_02e9dc95a939 -->|defined in| 12df736e_94b1_ebf9_17a3_db9629d378d2 fd0d6415_5889_d4e9_fb29_ffffea31a6af["testCompressionOfBatchedFlowOfData()"] fd0d6415_5889_d4e9_fb29_ffffea31a6af -->|calls| 595e3ace_50b6_3a6a_b693_02e9dc95a939 style 595e3ace_50b6_3a6a_b693_02e9dc95a939 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-compression/src/test/java/io/netty/handler/codec/compression/LzmaFrameEncoderTest.java lines 49–79
@Override
protected void testCompressionOfBatchedFlow(final ByteBuf data) throws Exception {
List<Integer> originalLengths = new ArrayList<Integer>();
final int dataLength = data.readableBytes();
int written = 0, length = rand.nextInt(50);
while (written + length < dataLength) {
ByteBuf in = data.retainedSlice(written, length);
assertTrue(channel.writeOutbound(in));
written += length;
originalLengths.add(length);
length = rand.nextInt(50);
}
length = dataLength - written;
ByteBuf in = data.retainedSlice(written, dataLength - written);
originalLengths.add(length);
assertTrue(channel.writeOutbound(in));
assertTrue(channel.finish());
CompositeByteBuf decompressed = Unpooled.compositeBuffer();
ByteBuf msg;
int i = 0;
while ((msg = channel.readOutbound()) != null) {
ByteBuf decompressedMsg = decompress(msg, originalLengths.get(i++));
decompressed.addComponent(true, decompressedMsg);
}
assertEquals(originalLengths.size(), i);
assertEquals(data, decompressed);
decompressed.release();
data.release();
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does testCompressionOfBatchedFlow() do?
testCompressionOfBatchedFlow() is a function in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/LzmaFrameEncoderTest.java.
Where is testCompressionOfBatchedFlow() defined?
testCompressionOfBatchedFlow() is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/LzmaFrameEncoderTest.java at line 49.
What calls testCompressionOfBatchedFlow()?
testCompressionOfBatchedFlow() is called by 1 function(s): testCompressionOfBatchedFlowOfData.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free