Example #1
0
        /// <summary>
        /// Gets a PooledBitWriter from the static BitWriterPool
        /// </summary>
        /// <returns>PooledBitWriter</returns>
        public static PooledBitWriter Get(Stream stream)
        {
            PooledBitWriter writer = BitWriterPool.GetWriter(stream);

            writer.isDisposed = false;
            return(writer);
        }
Example #2
0
 /// <summary>
 /// Returns the PooledBitWriter into the static BitWriterPool
 /// </summary>
 public void Dispose()
 {
     if (!isDisposed)
     {
         isDisposed = true;
         BitWriterPool.PutBackInPool(this);
     }
 }