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

Method Advance

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

Source from the content-addressed store, hash-verified

326}
327
328inline bool BitReader::Advance(int64_t num_bits) {
329 int64_t bits_required = bit_offset_ + num_bits;
330 int64_t bytes_required = bit_util::BytesForBits(bits_required);
331 if (ARROW_PREDICT_FALSE(bytes_required > max_bytes_ - byte_offset_)) {
332 return false;
333 }
334 byte_offset_ += static_cast<int>(bits_required >> 3);
335 bit_offset_ = static_cast<int>(bits_required & 7);
336 buffered_values_ =
337 detail::ReadLittleEndianWord(buffer_ + byte_offset_, max_bytes_ - byte_offset_);
338 return true;
339}
340
341inline bool BitReader::AdvanceBytes(int num_bytes) {
342 if (ARROW_PREDICT_FALSE(num_bytes > max_bytes_ - byte_offset_)) {

Callers 5

CheckDecoderClobberFunction · 0.45
CheckBitmapDecoderFunction · 0.45
TestRleDecoderFunction · 0.45
TestBitPackedDecoderFunction · 0.45

Calls 2

BytesForBitsFunction · 0.85
ReadLittleEndianWordFunction · 0.85

Tested by 5

CheckDecoderClobberFunction · 0.36
CheckBitmapDecoderFunction · 0.36
TestRleDecoderFunction · 0.36
TestBitPackedDecoderFunction · 0.36