• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vortex-data / vortex / 16992335779

15 Aug 2025 02:38PM UTC coverage: 87.202% (-0.5%) from 87.72%
16992335779

Pull #2456

github

web-flow
Merge 39c262e2c into 4a23f65b3
Pull Request #2456: feat: basic BoolBuffer / BoolBufferMut

476 of 1231 new or added lines in 107 files covered. (38.67%)

74 existing lines in 19 files now uncovered.

56525 of 64821 relevant lines covered (87.2%)

623742.27 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

42.86
/vortex-buffer/src/bit/mod.rs
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: Copyright the Vortex contributors
3

4
//! Packed bitmaps that can be used to store boolean values.
5
//!
6
//! This module provides a wrapper on top of the `Buffer` type to store mutable and immutable
7
//! bitsets. The bitsets are stored in little-endian order, meaning that the least significant bit
8
//! of the first byte is the first bit in the bitset.
9
mod aligned;
10
#[cfg(feature = "arrow")]
11
mod arrow;
12
mod buf;
13
mod buf_mut;
14
mod ops;
15
mod unaligned;
16

17
pub use aligned::BitChunks;
18
pub use buf::*;
19
pub use buf_mut::*;
20

21
/// Get bit value at `index` out of `buf`
22
#[inline]
23
pub fn get_bit(buf: &[u8], index: usize) -> bool {
478✔
24
    buf[index / 8] & (1 << (index % 8)) != 0
478✔
25
}
478✔
26

27
/// Get bit value at `index` out of `buf` without bounds checking
28
///
29
/// # Safety
30
/// `index` must be between 0 and length of `buf`
31
#[inline]
NEW
32
pub unsafe fn get_bit_unchecked(buf: &[u8], index: usize) -> bool {
×
NEW
33
    let byte = unsafe { buf.get_unchecked(index / 8) };
×
NEW
34
    byte & (1 << (index % 8)) != 0
×
NEW
35
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc