Constructor
new VDataMeta(formatVersion, compressMethod, encryptMethod, blocksCount, storageStartTime, storageEndTime, queryStartTime, queryEndTime, extendedInfo)
The constructor for the meta info. For valid values see VData format specification.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
formatVersion |
number | 0 | format version |
compressMethod |
number | 0 | compress method |
encryptMethod |
number | 0 | compress method |
blocksCount |
number | 0 | count of bucket blocks in the data |
storageStartTime |
number | 0 | earliest time in the data |
storageEndTime |
number | 0 | last time in the data |
queryStartTime |
number | 0 | start time filter (inclusive) if the data is generated from an algorithm trigger |
queryEndTime |
number | 0 | end time filter (inclusive) if the data is generated from an algorithm trigger |
extendedInfo |
Uint8Array | null | extended info whereby implementation may add project-customized information |
Methods
blocksCount() → {number}
Get the count of bucket blocks in data.
Returns:
- Type
- number
compressMethod() → {number}
Get the data's compress method.
Returns:
- Type
- number
encryptMethod() → {number}
Get the data's encryption method.
Returns:
- Type
- number
extendedInfo() → {Uint8Array}
Get the extended info. Custom-implementation may add contents into this part of
data buffer.
Returns:
- Type
- Uint8Array
formatVersion() → {number}
Get the data's format version.
Returns:
- Type
- number
queryEndTime() → {number}
Get the query end time if the data is generated through an algorithm trigger.
Returns:
millisecond since EPOCH
- Type
- number
queryStartTime() → {number}
Get the query start time if the data is generated through an algorithm trigger.
Returns:
millisecond since EPOCH
- Type
- number
storageEndTime() → {number}
Get the data's last signal time (millisecond) in data. Note that this time
may be the evenly-split ending time of the last bucket. Also in living bucket
this time may be slightly different from the actual last signal time.
Returns:
millisecond since EPOCH
- Type
- number
storageStartTime() → {number}
Get the data's earliest signal time (millisecond) in data. Note that this time
may be the evenly-split starting time of the first bucket and slightly
different from the actual first signal time.
Returns:
millisecond since EPOCH
- Type
- number