where getShort/putShort are:```fun ByteArray.getShort(byteIndex: Int): Short {
val b1 = get(byteIndex).toPositiveInt()
val b2 = get(byteIndex + 1).toPositiveInt()
return ((b1 shl 8) + b2).toShort()
}
fun ByteArray.putShort(byteIndex: Int, value: Short) {
set(byteIndex, (value.toPositiveInt() ushr 8).toByte())
set(byteIndex + 1, value.toByte())
}```