tuweni / org.apache.tuweni.ssz / SSZ / encodeIntList

encodeIntList

static fun encodeIntList(bitLength: Int, vararg elements: Int): Bytes (source)

Encode a list of two's compliment integers.

Parameters

bitLength - the bit length of the encoded integers (must be a multiple of 8)

elements - the integers to write

Exceptions

IllegalArgumentException - if any values are too large for the specified bitLength

Return
SSZ encoding in a Bytes value

static fun encodeIntList(bitLength: Int, elements: MutableList<Int>): Bytes (source)

Encode a list of two's compliment integers.

Parameters

bitLength - the bit length of the encoded integers (must be a multiple of 8)

elements - the list of Integers to write

Exceptions

IllegalArgumentException - if any values are too large for the specified bitLength

Return
SSZ encoding in a Bytes value