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

Function BitsFromBytes

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

Read the first `count` bits of `bytes` (LSB first) into a vector of booleans.

Source from the content-addressed store, hash-verified

45
46/// Read the first `count` bits of `bytes` (LSB first) into a vector of booleans.
47std::vector<bool> BitsFromBytes(const std::vector<uint8_t>& bytes, rle_size_t count) {
48 std::vector<bool> bits(count);
49 for (rle_size_t i = 0; i < count; ++i) {
50 bits[i] = bit_util::GetBit(bytes.data(), i);
51 }
52 return bits;
53}
54
55struct CheckDecodedBitsParams {
56 const std::vector<uint8_t>& actual;

Callers 1

TEST_PFunction · 0.85

Calls 2

GetBitFunction · 0.70
dataMethod · 0.45

Tested by

no test coverage detected