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

Function read_byte_array_extending_negative

src/repr/src/row.rs:1304–1306  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

1302/// * length <= N
1303/// * offset + length <= data.len()
1304fn read_byte_array_extending_negative<const N: usize>(data: &mut &[u8], length: usize) -> [u8; N] {
1305 read_byte_array_sign_extending::<N, 255>(data, length)
1306}
1307
1308/// Read `length` bytes from `data` at `offset`, updating the
1309/// latter. Extend the resulting buffer to a positive or zero `N`-byte

Callers 1

read_datumFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected