(b64->byte-array s)
Inputs: [s :- (s/maybe s/Str)] Returns: (s/maybe ByteArray)
Inputs: [s :- (s/maybe s/Str)] Returns: (s/maybe ByteArray)
(byte-array size-or-seq)
(byte-array size init-val-or-seq)
(byte-array G__5919)
(byte-array G__5923 G__5924)
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:
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.
(byte-array->b64 b)
Inputs: [b :- (s/maybe ByteArray)] Returns: (s/maybe s/Str)
Note that this does not return a URL-safe string.
Inputs: [b :- (s/maybe ByteArray)] Returns: (s/maybe s/Str) Note that this does not return a URL-safe string.
(byte-array->debug-str ba)
Inputs: [ba :- ByteArray] Returns: s/Str
Inputs: [ba :- ByteArray] Returns: s/Str
(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])
(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)
(byte-array->utf8 ba)
Inputs: [ba :- (s/maybe ByteArray)] Returns: (s/maybe s/Str)
Inputs: [ba :- (s/maybe ByteArray)] Returns: (s/maybe s/Str)
(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
(char->int ch)
(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
(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.
(deflate data)
Inputs: [data :- (s/maybe ByteArray)] Returns: (s/maybe ByteArray)
Inputs: [data :- (s/maybe ByteArray)] Returns: (s/maybe ByteArray)
(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.
(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.
(gunzip ba)
(gzip ba)
(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)
(inflate deflated-data)
Inputs: [deflated-data :- (s/maybe ByteArray)] Returns: (s/maybe ByteArray)
Inputs: [deflated-data :- (s/maybe ByteArray)] Returns: (s/maybe ByteArray)
(md5 ba)
Inputs: [ba :- ByteArray] Returns: ByteArray
Inputs: [ba :- ByteArray] Returns: ByteArray
(read-byte-array-from-file filename)
Inputs: [filename :- s/Str] Returns: ByteArray
Inputs: [filename :- s/Str] Returns: ByteArray
(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.
(sha1 ba)
Inputs: [ba :- ByteArray] Returns: ByteArray
Inputs: [ba :- ByteArray] Returns: ByteArray
(sha256 ba)
Inputs: [ba :- ByteArray] Returns: ByteArray
Inputs: [ba :- ByteArray] Returns: ByteArray
(slice-byte-array ba)
(slice-byte-array ba start)
(slice-byte-array ba start end)
(slice-byte-array G__5948)
(slice-byte-array G__5952 G__5953)
(slice-byte-array G__5957 G__5958 G__5959)
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.
(utf8->byte-array s)
Inputs: [s :- (s/maybe s/Str)] Returns: (s/maybe ByteArray)
Inputs: [s :- (s/maybe s/Str)] Returns: (s/maybe ByteArray)
(write-byte-array-to-file filename ba)
Inputs: [filename :- s/Str ba :- ByteArray] Returns: Nil
Inputs: [filename :- s/Str ba :- ByteArray] Returns: Nil
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close