NewCompactArray
Creates a new CompactArray of specified size.
def NewCompactArray(
size: uint,
maxValue: Item
) - > CompactArray, error
Creates a new CompactArray of specified size.
Parameters
| Name | Type | Description |
|---|---|---|
| size | uint | The number of items the CompactArray can hold. |
| maxValue | Item | The maximum value that can be stored in the CompactArray, used to determine the number of bits needed per item. |
Returns
| Type | Description |
|---|---|
CompactArray, error | A new CompactArray instance or an error if the itemSize is invalid. |