Skip to main content

prepare_head_prefixes

Function prepare_head_prefixes 

Source
pub fn prepare_head_prefixes(prefixes: &[Vec<u8>]) -> Vec<Vec<u8>>
Expand description

Normalize a head-prefix filter for a prefix-filtered axis head walk.

Byte order is what the hexastore CFs iterate in, so sorting the raw prefix bytes orders their key ranges without decoding anything. Empty prefix bytes are dropped defensively (an empty prefix would match every key; a list that retains nothing after the drop is unfiltered, matching the empty-list wire convention). A prefix that extends a kept shorter one is dropped as subsumed — its whole key range was already visited under the shorter prefix, and re-walking it would double-emit heads.