Skip to main content

encode_i64_sortable

Function encode_i64_sortable 

Source
pub const fn encode_i64_sortable(value: i64) -> u64
Expand description

Encode an i64 value for sortable byte comparison.

XORs with the sign bit to ensure negative numbers sort before positive. The result should be written in big-endian format for correct lexicographic ordering.