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

Function AppendBitPackedRun

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

Source from the content-addressed store, hash-verified

394}
395
396void AppendBitPackedRun(std::vector<uint8_t>& bytes, std::vector<bool>& expected,
397 const std::vector<uint8_t>& packed) {
398 const auto groups = static_cast<rle_size_t>(packed.size());
399 AppendLeb128(bytes, (static_cast<uint32_t>(groups) << 1) | 1); // low bit 1 => packed
400 bytes.insert(bytes.end(), packed.begin(), packed.end());
401 for (rle_size_t i = 0; i < groups * 8; ++i) {
402 expected.push_back(bit_util::GetBit(packed.data(), i));
403 }
404}
405
406/// Decode the whole `bytes` into a bitmap and check it against `expected`.
407///

Callers 1

TESTFunction · 0.85

Calls 8

AppendLeb128Function · 0.85
push_backMethod · 0.80
GetBitFunction · 0.70
sizeMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected