decodeCopyWith4ByteOffset() — netty Function Reference
Architecture documentation for the decodeCopyWith4ByteOffset() function in Snappy.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD f1c4d3ee_834b_d5ad_b8b3_2d0617d38468["decodeCopyWith4ByteOffset()"] 6a7984ff_ded6_5ba2_b4bb_f92d0d3986f8["Snappy"] f1c4d3ee_834b_d5ad_b8b3_2d0617d38468 -->|defined in| 6a7984ff_ded6_5ba2_b4bb_f92d0d3986f8 f2623adf_f9d0_6b9a_01bf_992a8c89c1e8["decode()"] f2623adf_f9d0_6b9a_01bf_992a8c89c1e8 -->|calls| f1c4d3ee_834b_d5ad_b8b3_2d0617d38468 9a397f72_75fb_a24a_1007_bc2bd8ca3feb["validateOffset()"] f1c4d3ee_834b_d5ad_b8b3_2d0617d38468 -->|calls| 9a397f72_75fb_a24a_1007_bc2bd8ca3feb style f1c4d3ee_834b_d5ad_b8b3_2d0617d38468 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-compression/src/main/java/io/netty/handler/codec/compression/Snappy.java lines 597–626
private static int decodeCopyWith4ByteOffset(byte tag, ByteBuf in, ByteBuf out, int writtenSoFar) {
if (in.readableBytes() < 4) {
return NOT_ENOUGH_INPUT;
}
int initialIndex = out.writerIndex();
int length = 1 + (tag >> 2 & 0x03F);
int offset = in.readIntLE();
validateOffset(offset, writtenSoFar);
out.markReaderIndex();
if (offset < length) {
int copies = length / offset;
for (; copies > 0; copies--) {
out.readerIndex(initialIndex - offset);
out.readBytes(out, offset);
}
if (length % offset != 0) {
out.readerIndex(initialIndex - offset);
out.readBytes(out, length % offset);
}
} else {
out.readerIndex(initialIndex - offset);
out.readBytes(out, length);
}
out.resetReaderIndex();
return length;
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does decodeCopyWith4ByteOffset() do?
decodeCopyWith4ByteOffset() is a function in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Snappy.java.
Where is decodeCopyWith4ByteOffset() defined?
decodeCopyWith4ByteOffset() is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Snappy.java at line 597.
What does decodeCopyWith4ByteOffset() call?
decodeCopyWith4ByteOffset() calls 1 function(s): validateOffset.
What calls decodeCopyWith4ByteOffset()?
decodeCopyWith4ByteOffset() is called by 1 function(s): decode.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free