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

Function prepend_validity

nodedb-columnar/src/writer/encode.rs:43–49  ·  view source on GitHub ↗

Prepend a validity bitmap to compressed data.

(valid: &[bool], compressed: &[u8])

Source from the content-addressed store, hash-verified

41
42/// Prepend a validity bitmap to compressed data.
43pub(super) fn prepend_validity(valid: &[bool], compressed: &[u8]) -> Vec<u8> {
44 let bitmap = encode_validity_bitmap(valid);
45 let mut result = Vec::with_capacity(bitmap.len() + compressed.len());
46 result.extend_from_slice(&bitmap);
47 result.extend_from_slice(compressed);
48 result
49}
50
51/// Compute a simple schema hash for the footer.
52pub(super) fn compute_schema_hash(schema: &ColumnarSchema) -> u64 {

Callers 3

encode_i64_with_validityFunction · 0.85
encode_f64_with_validityFunction · 0.85
encode_single_blockFunction · 0.85

Calls 2

encode_validity_bitmapFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected