Function encode
Source pub fn encode(start: usize, end: usize, target: usize) -> BitVec<u8, Msb0>
Expand description
Encodes a value as a binary decision sequence (left/right),
given a sorted range [start, end) and the target value.
Returns a BitVec of left (0) and right (1) decisions.
§Panics
Panics if target is not in the range.
§Example
let path = bbse::encode(0, 8, 6);