Clone makes a copy of the bit array.
()
| 93 | |
| 94 | // Clone makes a copy of the bit array. |
| 95 | func (d BitArray) Clone() BitArray { |
| 96 | return BitArray{ |
| 97 | words: append([]word(nil), d.words...), |
| 98 | lastBitsUsed: d.lastBitsUsed, |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | // MakeZeroBitArray creates a bit array with the specified bit size. |
| 103 | func MakeZeroBitArray(bitLen uint) BitArray { |