org.mapdb / DataIO / packLong

packLong

static fun packLong(out: DataOutput, value: Long): Unit

Pack long into output. It will occupy 1-10 bytes depending on value (lower values occupy smaller space)

Parameters

out - DataOutput to put value into

value - to be serialized, must be non-negative

Exceptions

java.io.IOException - in case of IO error


static fun packLong(out: OutputStream, value: Long): Unit

Pack long into output. It will occupy 1-10 bytes depending on value (lower values occupy smaller space)

Parameters

out - OutputStream to put value into

value - to be serialized, must be non-negative

Exceptions

java.io.IOException - in case of IO error


static fun packLong(buf: ByteArray, pos: Int, value: Long): Int