toByteArray

Allocates a fresh byte array and writes the values of this bitset's underlying bytes to it. Within each byte, index 0 is the least significant bit, while index 7 is the most significant bit. (This matches Java's java.util.BitSet::toByteArray.)