BitBuffer

class BitBuffer

An appendable sequence of bits (0s and 1s). Mainly used by QrSegment.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun appendBits(value: Int, len: Int)

Appends the specified number of low-order bits of the specified value to this buffer. Requires 0 ≤ len ≤ 31 and 0 ≤ val < 2len.

Link copied to clipboard

Appends the content of the specified bit buffer to this buffer.

Link copied to clipboard
fun bitLength(): Int

Returns the length of this sequence, which is a non-negative value.

Link copied to clipboard

Returns a new copy of this buffer.

Link copied to clipboard
fun getBit(index: Int): Int

Returns the bit at the specified index, yielding 0 or 1.