MCPcopy Create free account
hub / github.com/apache/arrow-rs / append_packed_range

Method append_packed_range

arrow-buffer/src/builder/boolean.rs:235–249  ·  view source on GitHub ↗

Append `range` bits from `to_set` `to_set` is a slice of bits packed LSB-first into `[u8]` # Panics Panics if `to_set` does not contain `ceil(range.end / 8)` bytes

(&mut self, range: Range<usize>, to_set: &[u8])

Source from the content-addressed store, hash-verified

233 ///
234 /// Panics if `to_set` does not contain `ceil(range.end / 8)` bytes
235 pub fn append_packed_range(&mut self, range: Range<usize>, to_set: &[u8]) {
236 let offset_write = self.len;
237 let len = range.end - range.start;
238 // allocate new bits as 0
239 self.advance(len);
240 // copy bits from to_set into self.buffer a word at a time
241 apply_bitwise_binary_op(
242 self.buffer.as_slice_mut(),
243 offset_write,
244 to_set,
245 range.start,
246 len,
247 |_a, b| b, // copy bits from to_set
248 );
249 }
250
251 /// Append [`BooleanBuffer`] to this [`BooleanBufferBuilder`]
252 pub fn append_buffer(&mut self, buffer: &BooleanBuffer) {

Callers 7

boolean_append_packedFunction · 0.80
append_bufferMethod · 0.80
test_bool_buffer_fuzzFunction · 0.80
test_truncateFunction · 0.80
filter_bitsFunction · 0.80
readMethod · 0.80
unary_optMethod · 0.80

Calls 3

apply_bitwise_binary_opFunction · 0.85
advanceMethod · 0.45
as_slice_mutMethod · 0.45

Tested by 2

test_bool_buffer_fuzzFunction · 0.64
test_truncateFunction · 0.64