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

Function EncodeFixed64

storage/sstable/hfile/coding.cpp:26–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void EncodeFixed64(char* buf, uint64_t value) {
27 if (ByteOrder::IsBigEndian()) {
28 memcpy(buf, &value, sizeof(value));
29 } else {
30 buf[0] = value & 0xff;
31 buf[1] = (value >> 8) & 0xff;
32 buf[2] = (value >> 16) & 0xff;
33 buf[3] = (value >> 24) & 0xff;
34 buf[4] = (value >> 32) & 0xff;
35 buf[5] = (value >> 40) & 0xff;
36 buf[6] = (value >> 48) & 0xff;
37 buf[7] = (value >> 56) & 0xff;
38 }
39}
40
41void PutFixed32(std::string* dst, uint32_t value) {
42 char buf[sizeof(value)];

Callers 1

PutFixed64Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected