write

fun write(value: Boolean)

Writes one bit to the stream.


fun write(value: Long, bits: Int)

Writes bits from the Long. The bits should be in 1..64. The bits are written in natural order that means BigEndian byte order for integers which have more than one byte.


fun write(value: ULong, bits: Int)

Writes bits from the ULong. The bits should be in 1..64. The bits are written in natural order that means BigEndian byte order for integers which have more than one byte.


fun write(value: BigInteger, bits: Int)

Writes arbitrary number of bits from the BigInteger. The bits are written in natural order that means BigEndian byte order for integers which have more than one byte.