readIntLe

fun ByteArray.readIntLe(offset: Int): Int

Reads a 32-bit signed integer in little-endian order starting at offset.

Little-endian means the least significant byte is stored at the lowest index: the byte at offset contributes bits 0..7 and the byte at offset + 3 contributes bits 24..31.

Return

the decoded value.

Parameters

offset

the index of the first byte to read.

Throws

if offset is negative or offset + 4 exceeds the array size.