MCPcopy Create free account
hub / github.com/chen3feng/toft / EncodeFixed32

Function EncodeFixed32

storage/sstable/hfile/coding.cpp:15–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

PutFixed32Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected