public static StringBuilder PrintMask(this FastBitMask64 ba, int greenbit = -1, bool[] redbits = null)
        {
            str.Length = 0;
            str.Append("[");
            for (int i = ba.BitCount - 1; i >= 0; --i)
            {
                if (i == greenbit)
                {
                    str.Append("<color=green>").Append(ba[i] ? 1 : 0).Append("</color>");
                }
                else if (redbits != null && i < redbits.Length && redbits[i])
                {
                    str.Append("<color=red>").Append(ba[i] ? 1 : 0).Append("</color>");
                }
                else
                {
                    str.Append(ba[i] ? "1" : "<color=#0f0f0f>0</color>");
                }

                if (i % 32 == 0)
                {
                    str.Append((i == 0) ? "]" : "] [");
                }
                else if (i % 8 == 0 && i != 0)
                {
                    str.Append(":");
                }
            }

            return(str);
        }
        public static StringBuilder PrintMask(this FastBitMask64 ba, StringBuilder[] colorbits = null)
        {
            str.Length = 0;
            str.Append("[");
            for (int i = ba.BitCount - 1; i >= 0; --i)
            {
                if (colorbits != null && i < colorbits.Length && colorbits[i] != null && colorbits[i].ToString() != "")
                {
                    str.Append("<b><color=" + colorbits[i].ToString() + ">" + (ba[i] ? 1 : 0) + "</color></b>");
                }
                else
                {
                    str.Append(ba[i] ? "1" : "<color=#0f0f0f>0</color>");
                }

                if (i % 32 == 0)
                {
                    str.Append((i == 0) ? "]" : "] [");
                }
                else if (i % 8 == 0 && i != 0)
                {
                    str.Append(":");
                }
            }

            return(str);
        }
 private FastBitMask64(FastBitMask64 copyFrom)
 {
     this.bitmask  = copyFrom.bitmask;
     this.bitcount = copyFrom.bitcount;
     this.alltrue  = copyFrom.alltrue;
 }
 public bool Compare(FastBitMask64 other)
 {
     return
         (bitcount == other.bitcount &&
          bitmask == other.bitmask);
 }
 public void Copy(FastBitMask64 other)
 {
     bitcount = other.bitcount;
     bitmask  = other.bitmask;
     alltrue  = other.alltrue;
 }
 public void XOR(FastBitMask64 other)
 {
     bitmask ^= other.bitmask;
 }
 public void AND(FastBitMask64 other)
 {
     bitmask &= other.bitmask;
 }
 public void OR(FastBitMask64 other)
 {
     bitmask |= other.bitmask;
 }