Binary data processing utils, supports both CLJ and CLJS.
- rand Make random bytes.
- copy Java System/arraycopy wrapper, copy part of bytes to another bytes.
- copy-of Java java.utils.Arrays/copyOf wrapper, copy start of bytes to a new bytes.
- copy-of-range Java java.utils.Arrays/copyOfRange wrapper, copy part of bytes to a new bytes.
- fill Java java.utils.Arrays/fill wrapper, fill part of bytes with same byte value.
- equals? Java java.utils.Arrays/equals wrapper, test if two bytes are equal.
- join Join seq of bytes to a new bytes, like clojure.string/join.
- index-of Find index of separator in bytes, like clojure.string/index-of.
- put-byte/short/int/long/ubyte/ushort/uint/float/double Put fixed num value on bytes.
- get-byte/short/int/long/ubyte/ushort/uint/float/double Get fixed num value from bytes.
- get-str Get str from bytes.
- bytes->str Convert bytes to str.
- str->bytes Convert str to bytes.
- bytes->hex-str Convert bytes to hex str.
- hex-str->bytes Convert hex str to bytes.
- bytes->mime-base64 Convert bytes to MIME base64 str.
- bytes->url-base64 Convert bytes to URL base64 str.
- mime-base64->bytes Convert MIME base64 str to bytes.
- url-base64->bytes Convert URL base64 str to bytes.
- unpack-one Unpack single data from bytes.
- unpack-many Unpack seq of data from bytes.
- pack-one Pack single data to bytes.
- pack-many Pack seq of data to bytes.
- wrap Wrap a struct with pack/unpack-fn.
- coll Construct struct of repeat data as base struct.
- tuple Construct struct of seq of data one by one as base structs.
- keys Construct struct of seq of data in a map one by one as base structs.
- ->st-frame-fixed Construct struct of fixed length frame.
- ->st-frame-var Construct struct of var length frame that length is specified in header.
- ->st-frame-delimited Construct struct of frame that end with a delimiter.
- st-bytes Struct of bytes.
- st-str Struct of str.
- ->st-line Construct struct of line with specified end delimiter.
- st-unix-line Struct of unix line that end with \n.
- st-http-line Struct of http line that end with \r\n.
- st-byte/short/int/long/ubyte/ushort/uint/float/double Struct of fixed num.
Emacs .dir-locals.el example:
;; clj+cljs
((nil . ((cider-clojure-cli-aliases . ":dev:cljs:cljs-dev"))))
;; clj only
((nil . ((cider-clojure-cli-aliases . ":dev"))))
Test:
# test clj
make test
# test cljs
make cljs_test