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

Function ReadVarInt32

library/cpp/yson/varint.cpp:55–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 int ReadVarInt32(IInputStream* input, i32* value) {
56 ui64 varInt;
57 int bytesRead = ReadVarUInt64(input, &varInt);
58 if (varInt > Max<ui32>()) {
59 ythrow yexception() << "The data is too long to read i32";
60 }
61 *value = ZigZagDecode32(static_cast<ui32>(varInt));
62 return bytesRead;
63 }
64
65 int ReadVarInt64(IInputStream* input, i64* value) {
66 ui64 varInt;

Callers

nothing calls this directly

Calls 2

ReadVarUInt64Function · 0.85
ZigZagDecode32Function · 0.70

Tested by

no test coverage detected