Yea.Compression.BitArrayCompress.Set C# (CSharp) Method

Set() public method

public Set ( int index, bool val ) : void
index int
val bool
return void
        public void Set(int index, bool val)
        {
            lock (_lock)
            {
                if (_usingIndexes)
                {
                    IsDirty = true;
                    _offsets.RemoveAll(i => i == index);
                    if (val)
                    {
                        _offsets.Add((uint) index);
                        // set max
                        if (index > _curMax)
                            _curMax = (uint) index;
                    }

                    ChangeTypeIfNeeded();
                    return;
                }
                CheckBitArray();

                Resize(index);

                InternalSet(index, val);
            }
        }