encode3to4LittleEndian() — netty Function Reference
Architecture documentation for the encode3to4LittleEndian() function in Base64.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD ab863a79_b507_5845_6e6a_0ab6914875a1["encode3to4LittleEndian()"] 185f00a4_bc52_6a3f_9287_a20b3809bf29["Base64"] ab863a79_b507_5845_6e6a_0ab6914875a1 -->|defined in| 185f00a4_bc52_6a3f_9287_a20b3809bf29 7551fd15_5173_2a99_6a2e_fbfda3e91ed1["encode3to4()"] 7551fd15_5173_2a99_6a2e_fbfda3e91ed1 -->|calls| ab863a79_b507_5845_6e6a_0ab6914875a1 style ab863a79_b507_5845_6e6a_0ab6914875a1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-base/src/main/java/io/netty/handler/codec/base64/Base64.java lines 296–335
private static int encode3to4LittleEndian(
int inBuff, int numSigBytes, ByteBuf dest, int destOffset, byte[] alphabet, boolean addPadding) {
// Packing bytes into an int to reduce bound and reference count checking.
switch (numSigBytes) {
case 3:
dest.setInt(destOffset, alphabet[inBuff >>> 18 ] |
alphabet[inBuff >>> 12 & 0x3f] << 8 |
alphabet[inBuff >>> 6 & 0x3f] << 16 |
alphabet[inBuff & 0x3f] << 24);
return 4;
case 2:
if (addPadding) {
dest.setInt(destOffset, alphabet[inBuff >>> 18 ] |
alphabet[inBuff >>> 12 & 0x3f ] << 8 |
alphabet[inBuff >>> 6 & 0x3f ] << 16 |
EQUALS_SIGN << 24);
return 4;
} else {
dest.setMedium(destOffset, alphabet[inBuff >>> 18 ] |
alphabet[inBuff >>> 12 & 0x3f] << 8 |
alphabet[inBuff >>> 6 & 0x3f] << 16);
return 3;
}
case 1:
if (addPadding) {
dest.setInt(destOffset, alphabet[inBuff >>> 18 ] |
alphabet[inBuff >>> 12 & 0x3f] << 8 |
EQUALS_SIGN << 16 |
EQUALS_SIGN << 24);
return 4;
} else {
dest.setShort(destOffset, alphabet[inBuff >>> 18 ] |
alphabet[inBuff >>> 12 & 0x3f] << 8);
return 2;
}
default:
// NOOP
return 0;
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does encode3to4LittleEndian() do?
encode3to4LittleEndian() is a function in the netty codebase, defined in codec-base/src/main/java/io/netty/handler/codec/base64/Base64.java.
Where is encode3to4LittleEndian() defined?
encode3to4LittleEndian() is defined in codec-base/src/main/java/io/netty/handler/codec/base64/Base64.java at line 296.
What calls encode3to4LittleEndian()?
encode3to4LittleEndian() is called by 1 function(s): encode3to4.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free