MCPcopy Create free account
hub / github.com/apache/arrow / GetZigZagVlqInt

Method GetZigZagVlqInt

cpp/src/arrow/util/bit_stream_utils_internal.h:414–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412
413template <typename Int>
414inline bool BitReader::GetZigZagVlqInt(Int* v) {
415 static_assert(std::is_integral_v<Int>);
416 static_assert(std::is_signed_v<Int>);
417
418 std::make_unsigned_t<Int> u;
419 if (!GetVlqInt(&u)) return false;
420 u = (u >> 1) ^ (~(u & 1) + 1);
421 *v = ::arrow::util::SafeCopy<Int>(u);
422 return true;
423}
424
425} // namespace arrow::bit_util

Callers 4

TestZigZagFunction · 0.80
TestZigZag64Function · 0.80
InitHeaderMethod · 0.80
InitBlockMethod · 0.80

Calls

no outgoing calls

Tested by 2

TestZigZagFunction · 0.64
TestZigZag64Function · 0.64