Interface: shaka.extern.MsfCodec

Methods

decodeVarInt(bytesnon-null) → {bigint}

Decodes a variable-length integer from a slice holding exactly the bytes of one encoded value, as reported by varIntLength().
Parameters:
Name Type Description
bytes Uint8Array
Source:
Returns:
Type
bigint

decodeVarIntAt(bytesnon-null, offset) → {!{value: bigint, bytesRead: number}}

Decodes the variable-length integer starting at the given offset within a larger buffer, reporting how many bytes it consumed so the caller can continue.
Parameters:
Name Type Description
bytes Uint8Array
offset number
Source:
Returns:
Type
!{value: bigint, bytesRead: number}

encodeVarInt(writernon-null, value)

Appends a variable-length integer to the writer.
Parameters:
Name Type Description
writer shaka.util.DataViewWriter
value bigint
Source:

varIntLength(firstByte) → {number}

Returns the total length in bytes of the variable-length integer that starts with the given byte, so a reader knows how much to buffer before decoding.
Parameters:
Name Type Description
firstByte number
Source:
Returns:
Type
number