MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / read_byte_array_extending_nonnegative

Function read_byte_array_extending_nonnegative

src/repr/src/row.rs:1315–1320  ·  view source on GitHub ↗

Read `length` bytes from `data` at `offset`, updating the latter. Extend the resulting buffer to a positive or zero `N`-byte twos complement integer by filling the remaining bits with 0. SAFETY: length <= N offset + length <= data.len()

(
    data: &mut &[u8],
    length: usize,
)

Source from the content-addressed store, hash-verified

1313/// * length <= N
1314/// * offset + length <= data.len()
1315fn read_byte_array_extending_nonnegative<const N: usize>(
1316 data: &mut &[u8],
1317 length: usize,
1318) -> [u8; N] {
1319 read_byte_array_sign_extending::<N, 0>(data, length)
1320}
1321
1322pub(super) fn read_byte_array<const N: usize>(data: &mut &[u8]) -> [u8; N] {
1323 let (prev, next) = data.split_first_chunk().unwrap();

Callers 1

read_datumFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected