MCPcopy Create free account
hub / github.com/catboost/catboost / ArcSaveOffset

Function ArcSaveOffset

library/cpp/containers/comptrie/comptrie_impl.h:92–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91namespace NCompactTrie {
92 static inline ui64 ArcSaveOffset(size_t offset, IOutputStream& os) {
93 using namespace NCompactTrie;
94
95 if (!offset)
96 return 0;
97
98 char buf[16];
99 size_t len = PackOffset(buf, offset);
100 os.Write(buf, len);
101 return len;
102 }
103
104 // Unpack the offset to the next node. The encoding scheme can store offsets
105 // up to 7 bytes; whether they fit into size_t is another issue.

Callers 1

ArcSaveSelfMethod · 0.85

Calls 2

PackOffsetFunction · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected