MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / decode_row_kinds

Function decode_row_kinds

nodedb-array/src/codec/column_codec.rs:56–73  ·  view source on GitHub ↗
(data: &[u8])

Source from the content-addressed store, hash-verified

54}
55
56pub fn decode_row_kinds(data: &[u8]) -> ArrayResult<Vec<u8>> {
57 if data.len() < 4 {
58 return Err(ArrayError::SegmentCorruption {
59 detail: "row_kinds: truncated count".into(),
60 });
61 }
62 let count = u32::from_le_bytes(
63 data[0..4]
64 .try_into()
65 .expect("invariant: bounds-checked above (data.len() >= 4)"),
66 ) as usize;
67 if data.len() < 4 + count {
68 return Err(ArrayError::SegmentCorruption {
69 detail: "row_kinds: truncated body".into(),
70 });
71 }
72 Ok(data[4..4 + count].to_vec())
73}
74
75// ---------------------------------------------------------------------------
76// Timestamp columns: Vec<i64> via gorilla

Callers 3

row_kinds_roundtripFunction · 0.85
decode_structuralFunction · 0.85

Calls 3

lenMethod · 0.45
expectMethod · 0.45
to_vecMethod · 0.45

Tested by 2

row_kinds_roundtripFunction · 0.68