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

Function AppendLeb128

cpp/src/arrow/util/rle_bitmap_test.cc:381–387  ·  view source on GitHub ↗

Append the LEB128 (unsigned, little-endian base-128) encoding of `value`.

Source from the content-addressed store, hash-verified

379
380/// Append the LEB128 (unsigned, little-endian base-128) encoding of `value`.
381void AppendLeb128(std::vector<uint8_t>& out, uint32_t value) {
382 std::array<uint8_t, bit_util::kMaxLEB128ByteLenFor<uint32_t>> buf = {};
383 const auto n_bytes =
384 bit_util::WriteLEB128(value, buf.data(), static_cast<int32_t>(buf.size()));
385 ASSERT_GT(n_bytes, 0);
386 out.insert(out.end(), buf.data(), buf.data() + n_bytes);
387}
388
389void AppendRleRun(std::vector<uint8_t>& bytes, std::vector<bool>& expected, bool value,
390 rle_size_t count) {

Callers 3

AppendRleRunFunction · 0.85
AppendBitPackedRunFunction · 0.85
TESTFunction · 0.85

Calls 5

WriteLEB128Function · 0.85
dataMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected