org.mapdb / DataIO / packInt


static fun packInt(out: DataOutput, value: Int): Unit

Pack int into an output stream. It will occupy 1-5 bytes depending on value (lower values occupy smaller space)


out - DataOutput to put value into

value - to be serialized, must be non-negative

Exceptions - in case of IO error

static fun packInt(buf: ByteArray, pos: Int, value: Int): Int