(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.
(buffer->bytes buf)Bulk get on this ByteBuffer.
Bulk get on this ByteBuffer.
(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.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |