The minimum bit width required to encode the currently buffered indices.
| 502 | |
| 503 | /// The minimum bit width required to encode the currently buffered indices. |
| 504 | int bit_width() const override { |
| 505 | if (ARROW_PREDICT_FALSE(num_entries() == 0)) return 0; |
| 506 | if (ARROW_PREDICT_FALSE(num_entries() == 1)) return 1; |
| 507 | return bit_util::Log2(num_entries()); |
| 508 | } |
| 509 | |
| 510 | /// Encode value. Note that this does not actually write any data, just |
| 511 | /// buffers the value's index to be written later. |