BeechCMS / @beechcms/core / matchBytePrefix
Function: matchBytePrefix()
matchBytePrefix(
bytes,prefix):boolean
Checks whether a byte buffer starts with a specified byte prefix.
Parameters
bytes
Uint8Array
The byte buffer to inspect.
prefix
readonly number[]
The sequence of bytes to match against.
Returns
boolean
True if the buffer starts with the given prefix, false otherwise.