ankh v0.0.4 Ankh.Frame.Encoder.Utils
Utility functions for encoding/decoding values
Summary
Functions
Converts a boolean into the corresponding 0/1 integer values
Converts 0/1 integers into the corresponding boolean values
Generates an 0 padding binary of the specified size
Functions
Specs
bool_to_int!(boolean) :: 0 | 1
Converts a boolean into the corresponding 0/1 integer values
Raises on wrong arguments
Specs
int_to_bool!(0 | 1) :: boolean
Converts 0/1 integers into the corresponding boolean values
Raises on wrong arguments
Specs
padding(Integer.t) :: binary
Generates an 0 padding binary of the specified size