tuweni / org.apache.tuweni.ssz / SSZ / decodeLong

decodeLong

static fun decodeLong(source: Bytes!, bitLength: Int): Long (source)

Read a SSZ encoded two's-compliment long integer from a Bytes value.

Parameters

source - Bytes!: the SSZ encoded bytes

bitLength - Int: the bit length of the integer to read (a multiple of 8)

Exceptions

InvalidSSZTypeException - if there are insufficient encoded bytes for the desired bit length, or the decoded value was too large to fit into a long

EndOfSSZException - if there are no more SSZ values to read

Return
Long: a long