(bits int)
| 100 | } |
| 101 | |
| 102 | func (bA *BitArray) copyBits(bits int) *BitArray { |
| 103 | c := make([]uint64, (bits+63)/64) |
| 104 | copy(c, bA.Elems) |
| 105 | return &BitArray{ |
| 106 | Bits: bits, |
| 107 | Elems: c, |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | // Or returns a bit array resulting from a bitwise OR of the two bit arrays. |
| 112 | // If the two bit-arrys have different lengths, Or right-pads the smaller of the two bit-arrays with zeroes. |