MCPcopy Create free account
hub / github.com/ByConity/ByConity / EncodeFixed32

Function EncodeFixed32

src/Common/Coding.cpp:13–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace DB
12{
13void EncodeFixed32(char * buf, uint32_t value)
14{
15 if (kIsLittleEndian)
16 {
17 memcpy(buf, &value, sizeof(value));
18 }
19 else
20 {
21 buf[0] = value & 0xff;
22 buf[1] = (value >> 8) & 0xff;
23 buf[2] = (value >> 16) & 0xff;
24 buf[3] = (value >> 24) & 0xff;
25 }
26}
27
28void EncodeFixed64(char * buf, uint64_t value)
29{

Callers 2

WriteRawBlockMethod · 0.85
PutFixed32Function · 0.85

Calls 1

memcpyFunction · 0.85

Tested by

no test coverage detected