func NewBitArray(bits int) *BitArray {
	if bits <= 0 {
		return nil
	}
	return &BitArray{
		Bits:  uint(bits),
		Elems: make([]uint64, (bits+63)/64),
	}
}
NewBitArray returns a new bit array.
It returns nil if the number of bits is zero.
package types
import (
	"encoding/binary"
	"fmt"
	"regexp"
	"strings"
	"sync"
)
type BitArray struct {
	mtx   sync.Mutex
	Bits  uint     `json:"bits"`   
	Elems []uint64 `json:"elems"`  
}