Пример #1
0
            public static BitStreamFIFO Merge(BitStreamFIFO bitStream1, BitStreamFIFO bitStream2)
            {
                int newLength = bitStream1.Length + bitStream2.Length;

                bool[] mergedBools = new bool[newLength];
                Array.Copy(bitStream1.ToBoolArray(), bitStream1.readIndex, mergedBools, 0, bitStream1.Length);
                Array.Copy(bitStream2.ToBoolArray(), bitStream2.readIndex, mergedBools, bitStream1.Length, bitStream2.Length);

                return(new BitStreamFIFO(mergedBools));
            }