Apply a bitwise and to two inputs and return the result as a Buffer. The inputs are treated as bitmaps, meaning that offsets and length are specified in number of bits. # See Also [`BooleanBuffer::from_bitwise_binary_op`] for creating `BooleanBuffer`s directly
(
left: &Buffer,
left_offset_in_bits: usize,
right: &Buffer,
right_offset_in_bits: usize,
len_in_bits: usize,
)
| 147 | /// # See Also |
| 148 | /// * [`BooleanBuffer::from_bitwise_binary_op`] for creating `BooleanBuffer`s directly |
| 149 | pub fn buffer_bin_and( |
| 150 | left: &Buffer, |
| 151 | left_offset_in_bits: usize, |
| 152 | right: &Buffer, |
| 153 | right_offset_in_bits: usize, |
| 154 | len_in_bits: usize, |
| 155 | ) -> Buffer { |
| 156 | let result = BooleanBuffer::from_bitwise_binary_op( |
| 157 | left, |
| 158 | left_offset_in_bits, |
| 159 | right, |
| 160 | right_offset_in_bits, |
| 161 | len_in_bits, |
| 162 | |a, b| a & b, |
| 163 | ); |
| 164 | // Normalize non-zero BooleanBuffer offsets back to a zero-offset Buffer. |
| 165 | if result.offset() == 0 { |
| 166 | result.into_inner() |
| 167 | } else { |
| 168 | result.sliced() |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | /// Apply a bitwise or to two inputs and return the result as a Buffer. |
| 173 | /// The inputs are treated as bitmaps, meaning that offsets and length are specified in number of bits. |
no test coverage detected