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])
| 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) { |