sizeIdx2sizeCompute() — netty Function Reference
Architecture documentation for the sizeIdx2sizeCompute() function in SizeClasses.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3b0c05d0_815b_b398_4d70_7023a40b5c50["sizeIdx2sizeCompute()"] d1cbce7b_bd0a_5553_8e62_6deeb38137ff["SizeClasses"] 3b0c05d0_815b_b398_4d70_7023a40b5c50 -->|defined in| d1cbce7b_bd0a_5553_8e62_6deeb38137ff style 3b0c05d0_815b_b398_4d70_7023a40b5c50 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/main/java/io/netty/buffer/SizeClasses.java lines 280–293
@Override
public int sizeIdx2sizeCompute(int sizeIdx) {
int group = sizeIdx >> LOG2_SIZE_CLASS_GROUP;
int mod = sizeIdx & (1 << LOG2_SIZE_CLASS_GROUP) - 1;
int groupSize = group == 0? 0 :
1 << LOG2_QUANTUM + LOG2_SIZE_CLASS_GROUP - 1 << group;
int shift = group == 0? 1 : group;
int lgDelta = shift + LOG2_QUANTUM - 1;
int modSize = mod + 1 << lgDelta;
return groupSize + modSize;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does sizeIdx2sizeCompute() do?
sizeIdx2sizeCompute() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/SizeClasses.java.
Where is sizeIdx2sizeCompute() defined?
sizeIdx2sizeCompute() is defined in buffer/src/main/java/io/netty/buffer/SizeClasses.java at line 280.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free