fn combine_unequal_length_masks<F>(
l: &BooleanBuffer,
r: &BooleanBuffer,
op: F,
) -> BooleanBufferExpand description
Combines two masks of unequal length with the bitwise operation op,
passing the longer side’s tail through unchanged.
The longer mask is copied once into a [MutableBuffer] and op is then
applied in place over the common prefix. This avoids materialising the
prefix into its own buffer and copying both prefix and tail again through a
[BooleanBufferBuilder].
Neither the mask offsets nor the prefix length are assumed to be byte aligned: the copy keeps the longer mask’s offset within its first byte so it stays a plain byte copy, and that offset is carried over to the result. Only the longer mask’s own byte range is copied, so the result does not retain the backing allocation it was sliced from.