Library API
    Preparing search index...

    Function encodeBuffer

    • Serializes any object to a string and encodes it into a Uint8Array.

      Parameters

      • str: any

        The object or string to serialize and encode

      Returns Uint8Array<ArrayBuffer>

      A Uint8Array containing the encoded data

      const buf = encodeBuffer({ a: 1 });