Clone makes a copy of the bit array.
()
| 113 | |
| 114 | // Clone makes a copy of the bit array. |
| 115 | func (d BitArray) Clone() BitArray { |
| 116 | return BitArray{ |
| 117 | words: append([]word(nil), d.words...), |
| 118 | lastBitsUsed: d.lastBitsUsed, |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | // MakeZeroBitArray creates a bit array with the specified bit size. |
| 123 | func MakeZeroBitArray(bitLen uint) BitArray { |