BradSmith1985 / NonContig

A set of classes for working with sequences of bytes that are not contiguously allocated.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NonContig

A set of classes for working with sequences of bytes that are not contiguously allocated.

NcByteCollection

A collection class implementing IList<byte> which allows both sequential and random access to individual bytes or byte ranges. Internally, the data is stored as a linked list of 4KB blocks, designed to avoid the OutOfMemoryException that can occur when trying to allocate large contiguous arrays in .NET.

The class offers several methods for copying data to and from byte arrays, unmanaged memory and Stream objects. It also implements ICloneable for duplicating the data. Both binary and XML serialization are supported.

NcByteStream

A Stream-derived class that uses an NcByteCollection as its backing store. Designed as a replacement for MemoryStream in situations where the length is large or varies greatly.

Supported Frameworks

  • .NET Framework 4.6.1
  • .NET Core 3.1
  • .NET Standard 2.1

External Links

More information here: An Alternative to Large Byte Arrays and MemoryStream

About

A set of classes for working with sequences of bytes that are not contiguously allocated.

License:Other


Languages

Language:C# 100.0%