Noun.Bits (Anoma v0.29.0)

Summary

Functions

I take in big endian encoded bytes and switch the encoding to little endian.

I take in little endian encoded bytes and switch the encoding to big endian.

Functions

Link to this function

bit_list_to_integer(bits)

@spec bit_list_to_integer([0 | 1]) :: non_neg_integer()
Link to this function

byte_order_big_to_little(bytes)

@spec byte_order_big_to_little(binary()) :: binary()

I take in big endian encoded bytes and switch the encoding to little endian.

Link to this function

byte_order_little_to_big(bytes)

@spec byte_order_little_to_big(binary()) :: binary()

I take in little endian encoded bytes and switch the encoding to big endian.

Link to this function

integer_to_bits(number)

@spec integer_to_bits(Noun.noun_atom()) :: [0 | 1]
Link to this function

num_bits(n, block_size)

@spec num_bits(Noun.noun_atom(), non_neg_integer()) :: non_neg_integer()