[][src]Module packs::ll::types::fixed

Functions

byte_to_minus_tiny_int

Calculates from a (marker) byte the respective i8. The value of a MinusTinyInt is encoded as a 2-complement, but ranges only from 0xFF to 0xF0.

decode_minus_tiny_int
decode_plus_tiny_int
encode_i8
encode_i16
encode_i32
encode_i64
encode_minus_tiny_int

Encodes the a i8 into the bolt type MINUS_TINY_INT which can hold any number from -1 to -16. Input outside of this range leads to undefined output.

encode_plus_tiny_int
minus_tiny_int_to_byte

The reverse function to byte_to_minus_tiny_int for correct values. Note: This function does not check if the input is a valid MinusTinyInt.