clj-gearman.util

Miscellaneous utility functions.

bytea->int

(bytea->int byte-a)
Converts a byte array in big-endian order to signed integer.

bytea->msg

(bytea->msg byte-a enc)
Converts a null-separated byte array to a sequence of strings.

bytea->str

(bytea->str byte-a)(bytea->str byte-a enc)
Converts a byte array to a string in specific encoding. Defaults to UTF-8.

concat-bytea

(concat-bytea byte-arrays)
Concatenates a sequence of byte arrays into a single one.

fun-arity

(fun-arity fun)
Returns the count of arguments that the function takes.

int->bytea

(int->bytea x)
Converts signed integer to a byte array in big-endian order.

msg->bytea

(msg->bytea msg enc)
Converts a sequence of strings to a null-separated byte array.

new-uniq

(new-uniq)
Generates a new version 4 UUID.

str->bytea

(str->bytea str)(str->bytea str enc)
Converts a string in specific encoding to a byte array. Defaults to UTF-8.