natix.CompactDS.BitmapBuilders.CreateBitStream32 C# (CSharp) Method

CreateBitStream32() public static method

public static CreateBitStream32 ( IList L, int n ) : BitStream32
L IList
n int
return BitStream32
        public static BitStream32 CreateBitStream32(IList<int> L, int n = 0)
        {
            if (n == 0 && L.Count > 0) {
                n = L[L.Count - 1] + 1;
            }
            var b = new BitStream32 ();
            b.Write (false, n);
            foreach (var p in L) {
                b[p] = true;
            }
            return b;
        }