maxSuf() — netty Function Reference
Architecture documentation for the maxSuf() function in ByteBufUtil.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD f163dca2_b01f_aece_57c8_a62f9d5a9b40["maxSuf()"] 920454f6_25f6_4a9b_3d32_9684c3e11f6c["ByteBufUtil"] f163dca2_b01f_aece_57c8_a62f9d5a9b40 -->|defined in| 920454f6_25f6_4a9b_3d32_9684c3e11f6c 01cd6f08_cabc_df56_318f_9666e83f47c5["indexOf()"] 01cd6f08_cabc_df56_318f_9666e83f47c5 -->|calls| f163dca2_b01f_aece_57c8_a62f9d5a9b40 style f163dca2_b01f_aece_57c8_a62f9d5a9b40 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/main/java/io/netty/buffer/ByteBufUtil.java lines 327–356
private static long maxSuf(ByteBuf x, int m, int start, boolean isSuffix) {
int p = 1;
int ms = -1;
int j = start;
int k = 1;
byte a;
byte b;
while (j + k < m) {
a = x.getByte(j + k);
b = x.getByte(ms + k);
boolean suffix = isSuffix ? a < b : a > b;
if (suffix) {
j += k;
k = 1;
p = j - ms;
} else if (a == b) {
if (k != p) {
++k;
} else {
j += p;
k = 1;
}
} else {
ms = j;
j = ms + 1;
k = p = 1;
}
}
return ((long) ms << 32) + p;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does maxSuf() do?
maxSuf() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/ByteBufUtil.java.
Where is maxSuf() defined?
maxSuf() is defined in buffer/src/main/java/io/netty/buffer/ByteBufUtil.java at line 327.
What calls maxSuf()?
maxSuf() is called by 1 function(s): indexOf.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free