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

Function UnpackOffset

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

Unpack the offset to the next node. The encoding scheme can store offsets up to 7 bytes; whether they fit into size_t is another issue.

Source from the content-addressed store, hash-verified

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.
106 Y_FORCE_INLINE size_t UnpackOffset(const char* p, size_t len) {
107 size_t result = 0;
108
109 while (len--)
110 result = ((result << 8) | (*(p++) & 0xFF));
111
112 return result;
113 }
114
115 // Auxiliary function: consumes one character from the input. Advances the data pointer
116 // to the position immediately preceding the value for the link just traversed (if any);

Callers 6

TNodeMethod · 0.85
ReadNodeFunction · 0.85
ReadNodeConstFunction · 0.85
AdvanceFunction · 0.85
TraverseEpsilonFunction · 0.85
LeapByteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected