Classes
Methods
getChunkSize() → {number}
Get the chunk size.
Returns:
Chunk size
- Type
- number
getHeaderData() → {Uint8Array|null}
Get the raw header data.
Returns:
Header data
- Type
- Uint8Array | null
getMagicBytes() → {Uint8Array}
Get the magic bytes
Returns:
Magic bytes
- Type
- Uint8Array
getNonce() → {Uint8Array|null}
Get the nonce.
Returns:
The nonce saved in the header.
- Type
- Uint8Array | null
getVersion() → {number}
Get the Salmon format version
Returns:
The format version
- Type
- number
setChunkSize(chunkSize)
Set the header chunk size
Parameters:
Name | Type | Description |
---|---|---|
chunkSize |
number | The chunk size |
setNonce(nonce)
Set the nonce to be used.
Parameters:
Name | Type | Description |
---|---|---|
nonce |
Uint8Array | The nonce |
setVersion(version)
Set the Salmon format version
Parameters:
Name | Type | Description |
---|---|---|
version |
number | The format version |
(async, static) parseHeaderData(stream) → {Promise.<SalmonHeader>}
Parse the header data from the stream
Parameters:
Name | Type | Description |
---|---|---|
stream |
RandomAccessStream | The stream. |
Throws:
IOException Thrown if there is an IO error.
Returns:
The header
- Type
- Promise.<SalmonHeader>