Beispiel #1
0
        /// <summary>
        /// Gets a PooledBitReader from the static BitReaderPool
        /// </summary>
        /// <returns>PooledBitReader</returns>
        public static PooledBitReader Get(Stream stream)
        {
            PooledBitReader reader = BitReaderPool.GetReader(stream);

            reader.isDisposed = false;
            return(reader);
        }
Beispiel #2
0
 /// <summary>
 /// Returns the PooledBitReader into the static BitReaderPool
 /// </summary>
 public void Dispose()
 {
     if (!isDisposed)
     {
         isDisposed = true;
         BitReaderPool.PutBackInPool(this);
     }
 }