Serializes any object to a string and encodes it into a Uint8Array.
The object or string to serialize and encode
A Uint8Array containing the encoded data
const buf = encodeBuffer({ a: 1 }); Copy
const buf = encodeBuffer({ a: 1 });
Serializes any object to a string and encodes it into a Uint8Array.