Redzen.IO MemoryBlockStream in C# (CSharp): 7 esempi trovati. Questi sono i migliori esempi reali in C# (CSharp) per Redzen.IO.MemoryBlockStream, estratti da progetti open source. Li puoi valutare, per aiutarci a migliorare la qualità dei nostri esempi.
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.