pub fn encode_offset(offset: f64) -> u32
Encode offset values into a signed integer to reduce byte cost without too much loss