erl_bits

Types


bt_endian() = big | little | native

bt_sign() = signed | unsigned

bt_type() = integer | float | binary | utf8 | utf16 | utf32

bt_unit() = 1..256

size() = all | unknown | integer() >= 0 | tuple()

type() = bytes
               | bitstring
               | bits
               | bt_type()
               | bt_endian()
               | bt_sign()
               | {unit, undefined | bt_unit()}

Functions


system_bitdefault() -> no_system_bitdefault

system_bittypes() -> no_system_types

as_list(Bittype::#bittype{type=undefined | bt_type(), unit=undefined | bt_unit(), sign=undefined | bt_sign(), endian=undefined | bt_endian()}) -> [bt_endian() | bt_sign() | bt_type() | {unit, undefined | bt_unit()}]

set_bit_type(Size::default | size(), TypeList::default | [type()]) -> {ok, undefined | size(), #bittype{type=undefined | bt_type(), unit=undefined | bt_unit(), sign=undefined | bt_sign(), endian=undefined | bt_endian()}} | {error, {undefined_bittype, term()}} | {error, {bittype_mismatch, term(), term(), string()}}