Skip to content
A set of classes for working with sequences of bytes that are not contiguously allocated.
C#
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
NcTests
NonContig
.gitattributes
.gitignore
NonContig.sln
README.md

README.md

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.

External Links

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

You can’t perform that action at this time.