Node Array
- Overview
- API
Layout#
would be compressed to
Internally a node struct is used
Usage#
CompressedNodeList has 2 constructors :-
allowing you to create the array from both compressed and uncompressed data
using the third constructor you can create an empty compressed array and fill it using Add() method in essence creating a comppressed array directly without calling the Compress() method
Data Access#
If individual elements need to be accessed it is recomended to do this while array is in Decompressed state, in that case complexity for GetAt() and SetAt() is O(1)
Complexity of GetAt() in Compressed state is O(logn), internally binary search is used.
danger
SetAt() in Compressed state is not implemented yet and will throw an exception if executed.
You can get the length of compressed data using CompressedLength