Liking cljdoc? Tell your friends :D

deercreeklabs.baracus


b64->byte-arrayclj/s

(b64->byte-array s)

Inputs: [s :- (s/maybe s/Str)] Returns: (s/maybe ByteArray)

Inputs: [s :- (s/maybe s/Str)]
Returns: (s/maybe ByteArray)
raw docstring

byte-arrayclj/s≠

clj
(byte-array size-or-seq)
(byte-array size init-val-or-seq)
cljs
(byte-array G__3320)
(byte-array G__3324 G__3325)

Inputs: ([size-or-seq :- s/Any] [size :- s/Int init-val-or-seq :- (s/if sequential? [s/Any] s/Any)]) Returns: ByteArray

Construct a byte array. Args:

  • size-or-seq: An integer size or sequence of bytes.
Inputs: ([size-or-seq :- s/Any] [size :- s/Int init-val-or-seq :- (s/if sequential? [s/Any] s/Any)])
Returns: ByteArray

Construct a byte array.
 Args:
   - size-or-seq: An integer size or sequence of bytes.
raw docstring

byte-array->b64clj/s

(byte-array->b64 b)

Inputs: [b :- (s/maybe ByteArray)] Returns: (s/maybe s/Str)

Inputs: [b :- (s/maybe ByteArray)]
Returns: (s/maybe s/Str)
raw docstring

byte-array->debug-strclj/s

(byte-array->debug-str ba)

Inputs: [ba :- ByteArray] Returns: s/Str

Inputs: [ba :- ByteArray]
Returns: s/Str
raw docstring

byte-array->fragmentsclj/s

(byte-array->fragments ba fragment-size)

Inputs: [ba :- (s/maybe ByteArray) fragment-size :- s/Int] Returns: (s/maybe [ByteArray])

Inputs: [ba :- (s/maybe ByteArray) fragment-size :- s/Int]
Returns: (s/maybe [ByteArray])
raw docstring

byte-array->hex-strclj/s

(byte-array->hex-str ba)

Inputs: [ba :- (s/maybe ByteArray)] Returns: (s/maybe s/Str)

Inputs: [ba :- (s/maybe ByteArray)]
Returns: (s/maybe s/Str)
raw docstring

byte-array->utf8clj/s

(byte-array->utf8 ba)

Inputs: [ba :- (s/maybe ByteArray)] Returns: (s/maybe s/Str)

Inputs: [ba :- (s/maybe ByteArray)]
Returns: (s/maybe s/Str)
raw docstring

byte-array?clj/s

(byte-array? arg)

Inputs: [arg :- s/Any] Returns: s/Bool

Tests if the argument is a byte array

Inputs: [arg :- s/Any]
Returns: s/Bool

Tests if the argument is a byte array
raw docstring

ByteArrayclj/s


char->intclj/s

(char->int ch)

concat-byte-arraysclj/s

(concat-byte-arrays arrays)

Inputs: [arrays :- (s/maybe [(s/maybe ByteArray)])] Returns: (s/maybe ByteArray)

Concatenate a sequence of byte arrays

Inputs: [arrays :- (s/maybe [(s/maybe ByteArray)])]
Returns: (s/maybe ByteArray)

Concatenate a sequence of byte arrays
raw docstring

decode-intclj/s

(decode-int ba)

Inputs: [ba :- ByteArray] Returns: [(s/one s/Int :int) (s/optional ByteArray :unread-remainder)]

Takes an zig-zag encoded byte array and reads an integer from it. Returns a vector of the integer and, optionally, any unread bytes.

Inputs: [ba :- ByteArray]
Returns: [(s/one s/Int :int) (s/optional ByteArray :unread-remainder)]

Takes an zig-zag encoded byte array and reads an integer from it.
 Returns a vector of the integer and, optionally, any unread bytes.
raw docstring

deflateclj

(deflate data)

Inputs: [data :- (s/maybe ByteArray)] Returns: (s/maybe ByteArray)

Inputs: [data :- (s/maybe ByteArray)]
Returns: (s/maybe ByteArray)
raw docstring

encode-intclj/s

(encode-int i)

Inputs: [i :- s/Int] Returns: ByteArray

Zig zag encodes an integer. Returns the encoded bytes.

Inputs: [i :- s/Int]
Returns: ByteArray

Zig zag encodes an integer. Returns the encoded bytes.
raw docstring

equivalent-byte-arrays?clj/s

(equivalent-byte-arrays? a b)

Inputs: [a :- ByteArray b :- ByteArray] Returns: s/Bool

Test if two byte arrays are equivalent. Normal Clojure = on byte arrays checks identity, not equality. Note that this is an O(n) operation.

Inputs: [a :- ByteArray b :- ByteArray]
Returns: s/Bool

Test if two byte arrays are equivalent. Normal Clojure = on byte arrays
 checks identity, not equality. Note that this is an O(n) operation.
raw docstring

hex-str->byte-arrayclj/s

(hex-str->byte-array s)

Inputs: [s :- (s/maybe s/Str)] Returns: (s/maybe ByteArray)

Inputs: [s :- (s/maybe s/Str)]
Returns: (s/maybe ByteArray)
raw docstring

inflateclj

(inflate deflated-data)

Inputs: [deflated-data :- (s/maybe ByteArray)] Returns: (s/maybe ByteArray)

Inputs: [deflated-data :- (s/maybe ByteArray)]
Returns: (s/maybe ByteArray)
raw docstring

Nilclj/s


read-byte-array-from-fileclj

(read-byte-array-from-file filename)

Inputs: [filename :- s/Str] Returns: ByteArray

Inputs: [filename :- s/Str]
Returns: ByteArray
raw docstring

reverse-byte-arrayclj/s

(reverse-byte-array ba)

Inputs: [ba :- (s/maybe ByteArray)] Returns: (s/maybe ByteArray)

Returns a new byte array with bytes reversed.

Inputs: [ba :- (s/maybe ByteArray)]
Returns: (s/maybe ByteArray)

Returns a new byte array with bytes reversed.
raw docstring

sha256clj/s

(sha256 ba)

Inputs: [ba :- ByteArray] Returns: ByteArray

Inputs: [ba :- ByteArray]
Returns: ByteArray
raw docstring

slice-byte-arrayclj/s≠

clj
(slice-byte-array ba)
(slice-byte-array ba start)
(slice-byte-array ba start end)
cljs
(slice-byte-array G__3349)
(slice-byte-array G__3353 G__3354)
(slice-byte-array G__3358 G__3359 G__3360)

Inputs: ([ba :- (s/maybe ByteArray)] [ba :- (s/maybe ByteArray) start :- s/Num] [ba :- (s/maybe ByteArray) start :- s/Num end :- s/Num]) Returns: (s/maybe ByteArray)

Return a slice of the given byte array. Args: - ba - Byte array to be sliced. Required. - start - Start index. Optional. Defaults to 0. - end - End index. Optional. If not provided, the slice will extend to the end of the array. The returned slice will not contain the byte at the end index position, i.e.: the slice fn uses a half-open interval.

Inputs: ([ba :- (s/maybe ByteArray)] [ba :- (s/maybe ByteArray) start :- s/Num] [ba :- (s/maybe ByteArray) start :- s/Num end :- s/Num])
Returns: (s/maybe ByteArray)

Return a slice of the given byte array.
 Args:
      - ba - Byte array to be sliced. Required.
      - start - Start index. Optional. Defaults to 0.
      - end - End index. Optional. If not provided, the slice will extend
           to the end of the array. The returned slice will not contain
           the byte at the end index position, i.e.: the slice fn uses
           a half-open interval.
raw docstring

utf8->byte-arrayclj/s

(utf8->byte-array s)

Inputs: [s :- (s/maybe s/Str)] Returns: (s/maybe ByteArray)

Inputs: [s :- (s/maybe s/Str)]
Returns: (s/maybe ByteArray)
raw docstring

write-byte-array-to-fileclj

(write-byte-array-to-file filename ba)

Inputs: [filename :- s/Str ba :- ByteArray] Returns: Nil

Inputs: [filename :- s/Str ba :- ByteArray]
Returns: Nil
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close