encode

fun encode(value: Int): ByteArray

Encode an integer as a Variable Byte Integer.

Throws

if value exceeds MAX_VALUE or is negative.