binary-streams / loggersoft.kotlin.streams / BitStream / write

write

fun write(value: Boolean): Unit

Writes one bit to the stream.

fun write(value: Byte): Unit

Writes one byte to the stream.

fun write(value: Long, bits: Int): Unit

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): Unit

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): Unit

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.