Module util

Source
Expand description

Utilities/functions that are useful across all specifications

Structs§

Command
A command container. Decoding of a comand and length
CustomOrdWrapper
Wrapper struct for custom ordering

Traits§

BBoxQuantization
CustomOrd
Manager for float based comparisons

Functions§

command_decode
Decode a command with the given length of the data that follows.
command_encode
Encode a command with the given length of the data that follows.
delta_decode_array
Decode an array that was encoded using delta encoding.
delta_decode_sorted_array
Decode a sorted array that was encoded using delta encoding.
delta_encode_array
Encode an array using delta encoding.
delta_encode_sorted_array
Encode a sorted array using delta encoding.
dequantize_lat
Converts quantized latitude back to geographical latitude
dequantize_lon
Converts quantized longitude back to geographical longitude
pack24_bit_uint
Packs a 24-bit integer into a buffer at the specified offset.
pack_float
Packs a float into a buffer at the specified offset using little-endian format.
quantize_lat
24-bit quantization ~0.000010728836059570312 degrees precision ~1.194 meters precision
quantize_lon
24-bit quantization ~0.000021457672119140625 degrees precision ~2.388 meters precision
unpack24_bit_uint
Unpacks a 24-bit integer from a buffer at the specified offset.
unpack_float
Unpacks a float from a buffer at the specified offset using little-endian format.
unweave_2d
Deweave a 32-bit number into two 16-bit numbers.
unweave_3d
Deweave a 48-bit number into three 16-bit numbers. Returns the three 16-bit numbers in a tuple.
unweave_and_delta_decode_3d_array
Decode an array of 3D points that were encoded using interweaving and delta encoding.
unweave_and_delta_decode_array
Decode an array of points that were encoded using interweaving and delta encoding.
weave_2d
Interweave two 16-bit numbers into a 32-bit number. In theory two small numbers can end up varint encoded to use less space.
weave_3d
Interweave three 16-bit numbers into a 48-bit number. In theory three small numbers can end up varint encoded to use less space.
weave_and_delta_encode_3d_array
Encode an array of 3D points using interweaving and delta encoding.
weave_and_delta_encode_array
Encode an array of points using interweaving and delta encoding.
zagzig
Applies zigzag decoding to transform an unsigned integer into a signed integer.
zigzag
Applies zigzag encoding to transform a signed integer into an unsigned integer.