MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / decodeblock

Function decodeblock

imperative/src/impl/utils/base64.cpp:38–42  ·  view source on GitHub ↗

** decodeblock ** ** decode 4 '6-bit' characters into 3 8-bit binary bytes */

Source from the content-addressed store, hash-verified

36** decode 4 '6-bit' characters into 3 8-bit binary bytes
37*/
38void decodeblock(unsigned char in[4], unsigned char out[3]) {
39 out[0] = (unsigned char)(in[0] << 2 | in[1] >> 4);
40 out[1] = (unsigned char)(in[1] << 4 | in[2] >> 2);
41 out[2] = (unsigned char)(((in[2] << 6) & 0xc0) | in[3]);
42}
43
44} // namespace
45

Callers 1

decodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected