Constructor
new VDataByteReader(_uint8array)
The constructor for seekable byte array reader.
Parameters:
Name | Type | Description |
---|---|---|
_uint8array |
Uint8Array | byte array |
Methods
close()
Close the reader.
read(length) → {Uint8Array}
Read bytes by the specified length.
Parameters:
Name | Type | Description |
---|---|---|
length |
number |
Returns:
- Type
- Uint8Array
seek(pos)
Seek to the target position. If the target position is less than or equals to zero,
seek to the zero position. If the target position is more than the length of the
underlying byte array, seek to the end of the byte array.
Parameters:
Name | Type | Description |
---|---|---|
pos |
number | the target position |
skip(length)
Skip the specified length. If the ending position is more than the length of the
underlying byte array, skip to the end of the byte array.
Parameters:
Name | Type | Description |
---|---|---|
length |
number | the length to skip |