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

Function get_bit

arrow-buffer/src/util/bit_util.rs:40–42  ·  view source on GitHub ↗
(data: &[u8], i: usize)

Source from the content-addressed store, hash-verified

38/// Returns whether bit at position `i` in `data` is set or not
39#[inline]
40pub fn get_bit(data: &[u8], i: usize) -> bool {
41 data[i / 8] & (1 << (i % 8)) != 0
42}
43
44/// Returns whether bit at position `i` in `data` is set or not.
45///

Calls

no outgoing calls