C# (CSharp) Redzen.IO Namespace

Classes

Name Description
FileByteArray A byte array backed by a file on disk. The byte array has fixed length and random accessible as per a normal byte array, but is backed by a file rather than memory.
MemoryBlockStream A memory backed stream that stores byte data in blocks, this gives improved performance over System.IO.MemoryStream in some circumstances. MemoryStream is backed by a single byte array, hence if the capacity is reached a new byte array must be instantiated and the existing data copied across. In contrast, MemoryBlockStream grows in blocks and therefore avoids copying and re-instantiating large byte arrays. Also note that by using a sufficiently small block size the blocks will avoid being placed onto the large object heap, with various benefits, e.g. avoidance/mitigation of memory fragmentation.
NonClosingStreamWrapper Wraps a stream and prevents calls to Close() and Dispose() from being made on it. This is useful for other classes that wrap a stream but have no option to leave the wrapped stream open upon Dispose(), e.g. CryptoStream and BinaryWriter. Note. Later versions of the .NET framework have added a 'leaveOpen' option to some classes. Check before using this class.
StreamHelper General purpose helper methods for working with streams.