/// <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); }
/// <summary> /// Returns the PooledBitWriter into the static BitWriterPool /// </summary> public void Dispose() { if (!isDisposed) { isDisposed = true; BitWriterPool.PutBackInPool(this); } }