encodeShortTextIsLiteral() — netty Function Reference
Architecture documentation for the encodeShortTextIsLiteral() function in SnappyTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c490ee33_1dc2_0a79_931f_442d43405bc8["encodeShortTextIsLiteral()"] 1a449087_fef9_c1b9_33e3_88b8aff8d675["SnappyTest"] c490ee33_1dc2_0a79_931f_442d43405bc8 -->|defined in| 1a449087_fef9_c1b9_33e3_88b8aff8d675 style c490ee33_1dc2_0a79_931f_442d43405bc8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyTest.java lines 151–169
@Test
public void encodeShortTextIsLiteral() throws Exception {
ByteBuf in = Unpooled.wrappedBuffer(new byte[] {
0x6e, 0x65, 0x74, 0x74, 0x79
});
ByteBuf out = Unpooled.buffer(7);
snappy.encode(in, out, 5);
ByteBuf expected = Unpooled.wrappedBuffer(new byte[] {
0x05, // preamble length
0x04 << 2, // literal tag + length
0x6e, 0x65, 0x74, 0x74, 0x79 // "netty"
});
assertEquals(expected, out, "Encoded literal was invalid");
in.release();
out.release();
expected.release();
}
Domain
Subdomains
Source
Frequently Asked Questions
What does encodeShortTextIsLiteral() do?
encodeShortTextIsLiteral() is a function in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyTest.java.
Where is encodeShortTextIsLiteral() defined?
encodeShortTextIsLiteral() is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyTest.java at line 151.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free