Skip to content
Select language:English

Package-level declarations

MCL 1.3.5

Functions

Reads count values in big-endian byte order.

fun ByteArray.readDoubleArrayBE(offset: Int, values: DoubleArray, start: Int = 0, stop: Int = values.size)

Reads Double values in big-endian byte order into values.

Reads count values in little-endian byte order.

fun ByteArray.readDoubleArrayLE(offset: Int, values: DoubleArray, start: Int = 0, stop: Int = values.size)

Reads Double values in little-endian byte order into values.

Reads an 8-byte IEEE 754 Double in big-endian byte order.

Reads an 8-byte IEEE 754 Double in little-endian byte order.

Reads count values in big-endian byte order.

fun ByteArray.readFloatArrayBE(offset: Int, values: FloatArray, start: Int = 0, stop: Int = values.size)

Reads Float values in big-endian byte order into values.

Reads count values in little-endian byte order.

fun ByteArray.readFloatArrayLE(offset: Int, values: FloatArray, start: Int = 0, stop: Int = values.size)

Reads Float values in little-endian byte order into values.

Reads a 4-byte IEEE 754 Float in big-endian byte order.

Reads a 4-byte IEEE 754 Float in little-endian byte order.

fun ByteArray.readIntArrayBE(offset: Int, count: Int): IntArray

Reads count values in big-endian byte order.

fun ByteArray.readIntArrayBE(offset: Int, values: IntArray, start: Int = 0, stop: Int = values.size)

Reads Int values in big-endian byte order into values.

fun ByteArray.readIntArrayLE(offset: Int, count: Int): IntArray

Reads count values in little-endian byte order.

fun ByteArray.readIntArrayLE(offset: Int, values: IntArray, start: Int = 0, stop: Int = values.size)

Reads Int values in little-endian byte order into values.

fun ByteArray.readIntBE(offset: Int): Int

Reads a 4-byte Int in big-endian byte order.

fun ByteArray.readIntLE(offset: Int): Int

Reads a 4-byte Int in little-endian byte order.

fun ByteArray.readLongArrayBE(offset: Int, count: Int): LongArray

Reads count values in big-endian byte order.

fun ByteArray.readLongArrayBE(offset: Int, values: LongArray, start: Int = 0, stop: Int = values.size)

Reads Long values in big-endian byte order into values.

fun ByteArray.readLongArrayLE(offset: Int, count: Int): LongArray

Reads count values in little-endian byte order.

fun ByteArray.readLongArrayLE(offset: Int, values: LongArray, start: Int = 0, stop: Int = values.size)

Reads Long values in little-endian byte order into values.

Reads an 8-byte Long in big-endian byte order.

Reads an 8-byte Long in little-endian byte order.

Reads count values in big-endian byte order.

fun ByteArray.readShortArrayBE(offset: Int, values: ShortArray, start: Int = 0, stop: Int = values.size)

Reads Short values in big-endian byte order into values.

Reads count values in little-endian byte order.

fun ByteArray.readShortArrayLE(offset: Int, values: ShortArray, start: Int = 0, stop: Int = values.size)

Reads Short values in little-endian byte order into values.

Reads a 2-byte Short in big-endian byte order.

Reads a 2-byte Short in little-endian byte order.

fun ByteArray.readUIntArrayBE(offset: Int, count: Int): UIntArray

Reads count values in big-endian byte order.

fun ByteArray.readUIntArrayBE(offset: Int, values: UIntArray, start: Int = 0, stop: Int = values.size)

Reads UInt values in big-endian byte order into values.

fun ByteArray.readUIntArrayLE(offset: Int, count: Int): UIntArray

Reads count values in little-endian byte order.

fun ByteArray.readUIntArrayLE(offset: Int, values: UIntArray, start: Int = 0, stop: Int = values.size)

Reads UInt values in little-endian byte order into values.

Reads a 4-byte UInt in big-endian byte order.

Reads a 4-byte UInt in little-endian byte order.

Reads count values in big-endian byte order.

fun ByteArray.readULongArrayBE(offset: Int, values: ULongArray, start: Int = 0, stop: Int = values.size)

Reads ULong values in big-endian byte order into values.

Reads count values in little-endian byte order.

fun ByteArray.readULongArrayLE(offset: Int, values: ULongArray, start: Int = 0, stop: Int = values.size)

Reads ULong values in little-endian byte order into values.

Reads an 8-byte ULong in big-endian byte order.

Reads an 8-byte ULong in little-endian byte order.

Reads count values in big-endian byte order.

fun ByteArray.readUShortArrayBE(offset: Int, values: UShortArray, start: Int = 0, stop: Int = values.size)

Reads UShort values in big-endian byte order into values.

Reads count values in little-endian byte order.

fun ByteArray.readUShortArrayLE(offset: Int, values: UShortArray, start: Int = 0, stop: Int = values.size)

Reads UShort values in little-endian byte order into values.

Reads a 2-byte UShort in big-endian byte order.

Reads a 2-byte UShort in little-endian byte order.

Converts a Double to a ByteArray in big-endian byte order.

Converts a Float to a ByteArray in big-endian byte order.

Converts an Int to a ByteArray in big-endian byte order.

Converts a Long to a ByteArray in big-endian byte order.

Converts a Short to a ByteArray in big-endian byte order.

Converts a UInt to a ByteArray in big-endian byte order.

Converts a ULong to a ByteArray in big-endian byte order.

Converts a UShort to a ByteArray in big-endian byte order.

fun DoubleArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this DoubleArray to a ByteArray in big-endian byte order.

fun FloatArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this FloatArray to a ByteArray in big-endian byte order.

fun IntArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this IntArray to a ByteArray in big-endian byte order.

fun LongArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this LongArray to a ByteArray in big-endian byte order.

fun ShortArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this ShortArray to a ByteArray in big-endian byte order.

fun UIntArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this UIntArray to a ByteArray in big-endian byte order.

fun ULongArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this ULongArray to a ByteArray in big-endian byte order.

fun UShortArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this UShortArray to a ByteArray in big-endian byte order.

Converts a Double to a ByteArray in little-endian byte order.

Converts a Float to a ByteArray in little-endian byte order.

Converts an Int to a ByteArray in little-endian byte order.

Converts a Long to a ByteArray in little-endian byte order.

Converts a Short to a ByteArray in little-endian byte order.

Converts a UInt to a ByteArray in little-endian byte order.

Converts a ULong to a ByteArray in little-endian byte order.

Converts a UShort to a ByteArray in little-endian byte order.

fun DoubleArray.toByteArrayLE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this DoubleArray to a ByteArray in little-endian byte order.

fun FloatArray.toByteArrayLE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this FloatArray to a ByteArray in little-endian byte order.

fun IntArray.toByteArrayLE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this IntArray to a ByteArray in little-endian byte order.

fun LongArray.toByteArrayLE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this LongArray to a ByteArray in little-endian byte order.

fun ShortArray.toByteArrayLE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this ShortArray to a ByteArray in little-endian byte order.

fun UIntArray.toByteArrayLE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this UIntArray to a ByteArray in little-endian byte order.

fun ULongArray.toByteArrayLE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this ULongArray to a ByteArray in little-endian byte order.

fun UShortArray.toByteArrayLE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this UShortArray to a ByteArray in little-endian byte order.

fun ByteArray.writeDoubleArrayBE(offset: Int, values: DoubleArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive Double values in big-endian byte order.

fun ByteArray.writeDoubleArrayLE(offset: Int, values: DoubleArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive Double values in little-endian byte order.

fun ByteArray.writeDoubleBE(offset: Int, value: Double)

Writes an IEEE 754 Double in big-endian byte order.

fun ByteArray.writeDoubleLE(offset: Int, value: Double)

Writes an IEEE 754 Double in little-endian byte order.

fun ByteArray.writeFloatArrayBE(offset: Int, values: FloatArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive Float values in big-endian byte order.

fun ByteArray.writeFloatArrayLE(offset: Int, values: FloatArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive Float values in little-endian byte order.

fun ByteArray.writeFloatBE(offset: Int, value: Float)

Writes an IEEE 754 Float in big-endian byte order.

fun ByteArray.writeFloatLE(offset: Int, value: Float)

Writes an IEEE 754 Float in little-endian byte order.

fun ByteArray.writeIntArrayBE(offset: Int, values: IntArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive Int values in big-endian byte order.

fun ByteArray.writeIntArrayLE(offset: Int, values: IntArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive Int values in little-endian byte order.

fun ByteArray.writeIntBE(offset: Int, value: Int)

Writes an Int in big-endian byte order.

fun ByteArray.writeIntLE(offset: Int, value: Int)

Writes an Int in little-endian byte order.

fun ByteArray.writeLongArrayBE(offset: Int, values: LongArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive Long values in big-endian byte order.

fun ByteArray.writeLongArrayLE(offset: Int, values: LongArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive Long values in little-endian byte order.

fun ByteArray.writeLongBE(offset: Int, value: Long)

Writes a Long in big-endian byte order.

fun ByteArray.writeLongLE(offset: Int, value: Long)

Writes a Long in little-endian byte order.

fun ByteArray.writeShortArrayBE(offset: Int, values: ShortArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive Short values in big-endian byte order.

fun ByteArray.writeShortArrayLE(offset: Int, values: ShortArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive Short values in little-endian byte order.

fun ByteArray.writeShortBE(offset: Int, value: Short)

Writes a Short in big-endian byte order.

fun ByteArray.writeShortLE(offset: Int, value: Short)

Writes a Short in little-endian byte order.

fun ByteArray.writeUIntArrayBE(offset: Int, values: UIntArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive UInt values in big-endian byte order.

fun ByteArray.writeUIntArrayLE(offset: Int, values: UIntArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive UInt values in little-endian byte order.

fun ByteArray.writeUIntBE(offset: Int, value: UInt)

Writes a UInt in big-endian byte order.

fun ByteArray.writeUIntLE(offset: Int, value: UInt)

Writes a UInt in little-endian byte order.

fun ByteArray.writeULongArrayBE(offset: Int, values: ULongArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive ULong values in big-endian byte order.

fun ByteArray.writeULongArrayLE(offset: Int, values: ULongArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive ULong values in little-endian byte order.

fun ByteArray.writeULongBE(offset: Int, value: ULong)

Writes a ULong in big-endian byte order.

fun ByteArray.writeULongLE(offset: Int, value: ULong)

Writes a ULong in little-endian byte order.

fun ByteArray.writeUShortArrayBE(offset: Int, values: UShortArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive UShort values in big-endian byte order.

fun ByteArray.writeUShortArrayLE(offset: Int, values: UShortArray, start: Int = 0, stop: Int = values.size)

Writes values as consecutive UShort values in little-endian byte order.

fun ByteArray.writeUShortBE(offset: Int, value: UShort)

Writes a UShort in big-endian byte order.

fun ByteArray.writeUShortLE(offset: Int, value: UShort)

Writes a UShort in little-endian byte order.