Splits payload (the UTF-8 bytes of an escaped Lua string literal) into
chunks of at most maxChunkBytes bytes, without splitting a multi-byte
UTF-8 sequence or a Lua escape sequence across two chunks.
Parameters
payload: Uint8Array
The UTF-8 encoded bytes of the escaped Lua string.
Splits payload (the UTF-8 bytes of an escaped Lua string literal) into chunks of at most maxChunkBytes bytes, without splitting a multi-byte UTF-8 sequence or a Lua escape sequence across two chunks.