Convert native data structures to/from raw bytes for network travel
Convert native data structures to/from raw bytes for network travel
(calculate-length log-state {cnvrtr :frereth.cp.shared.constants/type :as dscr})
(compose log-state tmplt fields)
serialize a map into a ByteBuf
serialize a map into a ByteBuf
(decompose tmplt src)
Read a C-style struct from a ByteBuf into a map, based on template
Read a C-style struct from a ByteBuf into a map, based on template
(decompose-array log-state tmplt src)
Read a C-style struct from a byte array into a map, based on template
Read a C-style struct from a byte array into a map, based on template
(decompose-array-field src
tmplt
{:keys [:frereth.cp.shared.serialization/index]
log-state :frereth.weald.specs/state
:as acc}
k)
Refactored from inside a reduce
Refactored from inside a reduce
(decompose-field! src tmplt acc k)
Refactored from inside a reduce
Refactored from inside a reduce
(do-compose log-state tmplt fields dst)
compose destructively. If you need that optimization
compose destructively. If you need that optimization
(do-composition-reduction tmplt fields dst log-state k)
Reduction function associated for run!ing from compose.
TODO: Think about a way to do this using specs instead.
Needing to declare these things twice is annoying.
Reduction function associated for run!ing from compose. TODO: Think about a way to do this using specs instead. Needing to declare these things twice is annoying.
(read-byte-array! dscr src)
From a ByteBuf
Destructive in the sense that it updates the readIndex in src
From a ByteBuf Destructive in the sense that it updates the readIndex in src
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close