@exodus/bytes
    Preparing search index...
    • Create a view of a TypedArray in the specified format ('uint8' or 'buffer')

      Important

      Does not copy data, returns a view on the same underlying buffer

      Warning

      Viewing Uint16Array (or other with BYTES_PER_ELEMENT > 1) as bytes is platform endianness-dependent.

      Parameters

      • arr: ArrayBufferView

        The input TypedArray

      • format: "uint8"

        The desired output format ('uint8' or 'buffer')

      Returns Uint8Array

      A view on the same underlying buffer

    • Create a view of a TypedArray in the specified format ('uint8' or 'buffer')

      Important

      Does not copy data, returns a view on the same underlying buffer

      Warning

      Viewing Uint16Array (or other with BYTES_PER_ELEMENT > 1) as bytes is platform endianness-dependent.

      Parameters

      • arr: ArrayBufferView

        The input TypedArray

      • format: "buffer"

        The desired output format ('uint8' or 'buffer')

      Returns Buffer

      A view on the same underlying buffer

    • Create a view of a TypedArray in the specified format ('uint8' or 'buffer')

      Important

      Does not copy data, returns a view on the same underlying buffer

      Warning

      Viewing Uint16Array (or other with BYTES_PER_ELEMENT > 1) as bytes is platform endianness-dependent.

      Parameters

      • arr: ArrayBufferView

        The input TypedArray

      • format: "buffer" | "uint8"

        The desired output format ('uint8' or 'buffer')

      Returns Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>

      A view on the same underlying buffer