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

Function encode_row_kinds

nodedb-array/src/codec/column_codec.rs:49–54  ·  view source on GitHub ↗
(row_kinds: &[u8])

Source from the content-addressed store, hash-verified

47// ---------------------------------------------------------------------------
48
49pub fn encode_row_kinds(row_kinds: &[u8]) -> Vec<u8> {
50 let mut out = Vec::with_capacity(4 + row_kinds.len());
51 out.extend_from_slice(&(row_kinds.len() as u32).to_le_bytes());
52 out.extend_from_slice(row_kinds);
53 out
54}
55
56pub fn decode_row_kinds(data: &[u8]) -> ArrayResult<Vec<u8>> {
57 if data.len() < 4 {

Callers 3

row_kinds_roundtripFunction · 0.85
encode_structuralFunction · 0.85

Calls 1

lenMethod · 0.45

Tested by 2

row_kinds_roundtripFunction · 0.68