bigIntToSortableBytes

fun bigIntToSortableBytes(bigInt: BigInteger, bigIntSize: Int, result: ByteArray, offset: Int)

Encodes a BigInteger value such that unsigned byte order comparison is consistent with BigInteger.compareTo. This also sign-extends the value to bigIntSize bytes if necessary: useful to create a fixed-width size.

See also

.sortableBytesToBigInt