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

      This does not copy values, but copies the underlying bytes. The result is similar to that of typedView(), but this function provides a copy, not a view of the same memory.

      Warning

      Copying underlying bytes from Uint16Array (or other with BYTES_PER_ELEMENT > 1) is platform endianness-dependent.

      Note

      Buffer might be pooled. Uint8Array return values are not pooled and match their underlying ArrayBuffer.

      Parameters

      • arr: ArrayBufferView

        The input TypedArray

      • format: "uint8"

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

      Returns Uint8Array

      A copy of the underlying buffer

    • Create a copy of TypedArray underlying bytes in the specified format ('uint8', 'buffer', or 'arraybuffer')

      This does not copy values, but copies the underlying bytes. The result is similar to that of typedView(), but this function provides a copy, not a view of the same memory.

      Warning

      Copying underlying bytes from Uint16Array (or other with BYTES_PER_ELEMENT > 1) is platform endianness-dependent.

      Note

      Buffer might be pooled. Uint8Array return values are not pooled and match their underlying ArrayBuffer.

      Parameters

      • arr: ArrayBufferView

        The input TypedArray

      • format: "arraybuffer"

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

      Returns ArrayBuffer

      A copy of the underlying buffer

    • Create a copy of TypedArray underlying bytes in the specified format ('uint8', 'buffer', or 'arraybuffer')

      This does not copy values, but copies the underlying bytes. The result is similar to that of typedView(), but this function provides a copy, not a view of the same memory.

      Warning

      Copying underlying bytes from Uint16Array (or other with BYTES_PER_ELEMENT > 1) is platform endianness-dependent.

      Note

      Buffer might be pooled. Uint8Array return values are not pooled and match their underlying ArrayBuffer.

      Parameters

      • arr: ArrayBufferView

        The input TypedArray

      • format: "buffer"

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

      Returns Buffer

      A copy of the underlying buffer

    • Create a copy of TypedArray underlying bytes in the specified format ('uint8', 'buffer', or 'arraybuffer')

      This does not copy values, but copies the underlying bytes. The result is similar to that of typedView(), but this function provides a copy, not a view of the same memory.

      Warning

      Copying underlying bytes from Uint16Array (or other with BYTES_PER_ELEMENT > 1) is platform endianness-dependent.

      Note

      Buffer might be pooled. Uint8Array return values are not pooled and match their underlying ArrayBuffer.

      Parameters

      • arr: ArrayBufferView

        The input TypedArray

      • format: OutputFormat

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

      Returns ArrayBuffer | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>

      A copy of the underlying buffer