Liking cljdoc? Tell your friends :D
Mostly cljs.
Exceptions indicated.

helins.binf.buffer

Buffers are the platform representation of a byte array which can be wrapped in a view and manipulated by using the core helins.binf namespaces. They represent a raw, fixed-size chunk of memory.

On the JVM, a buffer is indeed a byte-array.

In JS, it is either a js/ArrayBuffer or its sibling js/SharedArrayBuffer.

Buffers are the platform representation of a byte array which can be wrapped in a view
and manipulated by using the core `helins.binf` namespaces. They represent a raw, fixed-size
chunk of memory.

On the JVM, a buffer is indeed a `byte-array`.

In JS, it is either a `js/ArrayBuffer` or its sibling `js/SharedArrayBuffer`.
raw docstring

allocclj/s

(alloc n-byte)

Allocates a new buffer having n-byte bytes.

On the JVM, corresponds to a plain byte array.

In JS, corresponds to a JS ArrayBuffer.

In order to do anything interesting with this library, it needs to be wrapped in a helins.binf/view.

Allocates a new buffer having `n-byte` bytes.

On the JVM, corresponds to a plain byte array.

In JS, corresponds to a JS `ArrayBuffer`.

In order to do anything interesting with this library, it needs to be wrapped in a [[helins.binf/view]].
sourceraw docstring

alloc-sharedcljs

(alloc-shared n-byte)

Akin to alloc, allocates a JS SharedArrayBuffer.

Throws if they are not supported by the JS environment.

Akin to [[alloc]], allocates a JS `SharedArrayBuffer`.

Throws if they are not supported by the JS environment.
sourceraw docstring

alloc-shared?cljs

True if the JS environment supports using alloc-shared.

True if the JS environment supports using [[alloc-shared]].
sourceraw docstring

copyclj/s

(copy src-buffer)
(copy dest-buffer src-buffer)
(copy dest-buffer dest-offset src-buffer)
(copy dest-buffer dest-offset src-buffer src-offset)
(copy dest-buffer dest-offset src-buffer src-offset n-byte)

Copies a buffer to another buffer.

Copies a buffer to another buffer.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close