MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / encode

Function encode

libminifi/test/Server.cpp:141–147  ·  view source on GitHub ↗

encode uint32_t

Source from the content-addressed store, hash-verified

139
140// encode uint32_t
141uint8_t *encode(uint8_t *buf, uint32_t value) {
142 *buf++ = (value & 0xFF000000) >> 24;
143 *buf++ = (value & 0x00FF0000) >> 16;
144 *buf++ = (value & 0x0000FF00) >> 8;
145 *buf++ = (value & 0x000000FF);
146 return buf;
147}
148
149// encode uint32_t
150uint8_t *decode(uint8_t *buf, uint32_t &value) {

Callers 2

mainFunction · 0.85
encodeMethod · 0.85

Calls 2

c_strMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected