Liking cljdoc? Tell your friends :D

com.github.jimpil.bass.util


breducecljmacro

(breduce b ret init expr)

Similar to clojure.core/areduce but for ByteBuffer first arg. Does NOT expose an index symbol, because <expr> is expected to get the next byte via ByteBuffer.get(). The position of the buffer is marked at the start, so you do have options when it comes to consuming it more than once, or <expr> throwing. Avoids boxing.

Similar to `clojure.core/areduce` but for ByteBuffer first arg.
Does NOT expose an index symbol, because <expr> is expected to
get the next byte via `ByteBuffer.get()`. The position of the
buffer is marked at the start, so you do have options when it
comes to consuming it more than once, or <expr> throwing.
Avoids boxing.
sourceraw docstring

buffer->bytesclj

(buffer->bytes buf)

Bulk get on this ByteBuffer.

Bulk get on this ByteBuffer.
sourceraw docstring

buffer-reducibleclj

(buffer-reducible buf)

Turns the provided ByteBuffer into something reducible (i.e. compatible with reduce/transduce). The position of the buffer is marked at the start, so you do have options when it comes to consuming it more than once, partial consumption (per reduced?), or <expr> throwing. Incurs boxing (i.e. the reducing-fn will receive Byte as the second arg). See breduce above, if that is a concern.

Turns the provided ByteBuffer into something reducible
(i.e. compatible with reduce/transduce). The position of the
buffer is marked at the start, so you do have options when it
comes to consuming it more than once, partial consumption (per `reduced?`),
or <expr> throwing. Incurs boxing (i.e. the reducing-fn will receive
Byte as the second arg). See `breduce` above, if that is a concern.
sourceraw docstring

no-bytesclj

source

random-bytesclj

(random-bytes n)
source

unsigned-byte-rangeclj

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close