Returns a new bit vector representing this vector's contents followed by the specified vector's contents.
Returns a vector whose contents are the results of taking the first n
bits of this vector.
Returns a vector whose contents are the results of taking the first n
bits of this vector.
If this vector does not contain at least n
bits, an error message is returned.
take
Returns a bitwise AND of this vector with the specified vector.
Returns a bitwise AND of this vector with the specified vector.
The resulting vector's size is the minimum of this vector's size and the specified vector's size.
Consumes the first n
bits of this vector and decodes them with the specified function,
resulting in a vector of the remaining bits and the decoded value.
Consumes the first n
bits of this vector and decodes them with the specified function,
resulting in a vector of the remaining bits and the decoded value. If this vector
does not have n
bits or an error occurs while decoding, an error is returned instead.
Returns true if the n
th bit is high, false otherwise.
Returns true if the n
th bit is high, false otherwise.
if n >= size
Returns a bit vector of the same size with each bit shifted to the left n
bits.
Returns a bit vector of the same size with each bit shifted to the left n
bits.
Returns Some(true)
if the n
th bit is high, Some(false)
if low, and None
if n >= size
.
Returns a bitwise complement of this vector.
Returns a bitwise complement of this vector.
Returns a bitwise OR of this vector with the specified vector.
Returns a bitwise OR of this vector with the specified vector.
The resulting vector's size is the minimum of this vector's size and the specified vector's size.
Returns an n
-bit vector whose contents are this vector's contents followed by 0 or more low bits.
Returns an n
-bit vector whose contents are this vector's contents followed by 0 or more low bits.
if n
< size
Returns a bit vector of the same size with each bit shifted to the right n
bits.
Returns a bit vector of the same size with each bit shifted to the right n
bits.
whether the n
left-msot bits should take on the value of bit 0
Converts the contents of this vector to a java.nio.ByteBuffer
.
Converts the contents of this vector to a java.nio.ByteBuffer
.
The returned buffer is freshly allocated with limit set to the minimum number of bytes needed to represent the contents of this vector, position set to zero, and remaining set to the limit.
toByteVector
Converts the contents of this vector to a byte vector.
Converts the contents of this vector to a byte vector.
If this vector's size does not divide evenly by 8, the last byte of the returned vector will be zero-padded to the right.
Returns a new bit vector with the n
th bit high if high
is true or low if high
is false.
Returns a bitwise XOR of this vector with the specified vector.
Returns a bitwise XOR of this vector with the specified vector.
The resulting vector's size is the minimum of this vector's size and the specified vector's size.
Returns a bitwise AND of this vector with the specified vector.
Returns a bitwise AND of this vector with the specified vector.
The resulting vector's size is the minimum of this vector's size and the specified vector's size.
Returns a bit vector of the same size with each bit shifted to the left n
bits.
Returns a bit vector of the same size with each bit shifted to the left n
bits.
Returns a bit vector of the same size with each bit shifted to the right n
bits where the n
left-most bits are sign extended.
Returns a bit vector of the same size with each bit shifted to the right n
bits where the n
left-most bits are sign extended.
Returns a bit vector of the same size with each bit shifted to the right n
bits where the n
left-most bits are low.
Returns a bit vector of the same size with each bit shifted to the right n
bits where the n
left-most bits are low.
Returns a bitwise XOR of this vector with the specified vector.
Returns a bitwise XOR of this vector with the specified vector.
The resulting vector's size is the minimum of this vector's size and the specified vector's size.
Alias for get
.
Alias for get
.
get(Int)
Returns a new bit vector with the n
th bit low (and all other bits unmodified).
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Returns a new bit vector with the n
th bit high (and all other bits unmodified).
Returns a bitwise complement of this vector.
Returns a bitwise complement of this vector.
Returns a bitwise OR of this vector with the specified vector.
Returns a bitwise OR of this vector with the specified vector.
The resulting vector's size is the minimum of this vector's size and the specified vector's size.
Persistent vector of bits, stored as bytes.
Bits are numbered left to right, starting at 0.