Example #1
0
        public static Bits operator ^(IBitsStorage a, IBitsStorage b)
        {
            IBitsStorage longer  = a.GetCount > b.GetCount ? a : b;
            IBitsStorage shorter = a.GetCount > b.GetCount ? b : a;

            shorter += Bits.Zeroes(longer.GetCount - shorter.GetCount);
            return(new Bits(longer.GetData
                            .Zip(shorter.GetData, (c, d) => (byte)(c ^ d))
                            .ToArray(),
                            longer.GetCount));
        }
Example #2
0
 public void Append(IBitsStorage Data)
 {
     Append(Data.GetCount, Data.GetData);
 }