File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727
2828namespace arrow ::util {
2929
30+ // / A lightweight view over a bitmap.
3031template <typename B = uint8_t >
3132class BitmapSpan {
3233 public:
@@ -38,10 +39,13 @@ class BitmapSpan {
3839 Normalize ();
3940 }
4041
42+ // / Pointer to the byte where the first value is stored.
4143 constexpr byte_type* data () const noexcept { return data_; }
4244
45+ // / Bit offset of the first value in the first byte.
4346 constexpr size_type bit_start () const noexcept { return bit_start_; }
4447
48+ // / Return a new span starting at the given position.
4549 constexpr BitmapSpan NewStartingAt (size_type bit_start) const noexcept {
4650 auto out = *this ;
4751 out.bit_start_ += bit_start;
@@ -217,10 +221,6 @@ class BitPackedRunToBitMapDecoder
217221 data_ = run.raw_data_ptr ();
218222 values_count_ = run.values_count ();
219223 values_read_ = 0 ;
220- // This decoder bounds all of its reads by `values_count_` alone and does not
221- // carry `max_read_bytes`. Its memory safety therefore relies on the producer
222- // having sized the run to fit the backing buffer. Check that contract here,
223- // at the point it is relied upon (a negative max means "unbounded").
224224 ARROW_DCHECK (run.raw_data_max_size () < 0 ||
225225 bit_util::BytesForBits (values_count_) <= run.raw_data_max_size ());
226226 }
You can’t perform that action at this time.
0 commit comments