Byte Array
- Overview
- API
#
Layoutcaution
Byte Array is now marked obsolete due to performance concerns use node array instead
would be compressed to
you need to specify how to convert you objects to and from bytes
#
UsageCompressedByteList has 2 constructors :-
allowing you to create the array from both compressed and uncompressed data
you need to provide implementation on how to serialize and deserialize you type to and from bytes these are provided as func's
Serialization
In compressed format data is stored as list of bytes making it easy to read and write to disk
#
Data AccessIf 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.