Liking cljdoc? Tell your friends :D

bites.encoding


bitset->byteclj

source

bitset->bytesclj

(bitset->bytes bitset)
Creates a sequence of bytes to represent the given <bitset> (sequence of ones and zeros)
Pads with zeros when necessary to complete a byte.
---------------------------------
bitset            -> bytes
---------------------------------
[0 0 0 0 0 0 0 1] -> [2r00000001]
[0 1 1 0 1 1 0 1] -> [2r01101101]
---------------------------------
sourceraw docstring

bitsetsclj

source

byte->binary-strclj

(byte->binary-str b)
Creates a bitset string from byte <b>
--------------------------
byte         -> binary-str
--------------------------
[2r00000001] -> '00000001'
[2r01101101] -> '01101101'
--------------------------
sourceraw docstring

byte->bitsetclj

source

byte->bitset*clj

(byte->bitset* b)
Creates a bitset from byte <b>
---------------------------------
byte        -> bitset
---------------------------------
2r00000001 -> [0 0 0 0 0 0 0 1]
2r01101101 -> [0 1 1 0 1 1 0 1]
---------------------------------
sourceraw docstring

byte->ubyteclj

(byte->ubyte x)

Get the unsigned value of byte <b>.

byte -> unsigned-int

110 -> 110 0 -> 0 -1 -> 255

NOTE: Java doesn't support unsigned bytes so int must be used to get an unsigned byte

Get the unsigned value of byte <b>.
----------------------
byte   -> unsigned-int
----------------------
110    -> 110
0      -> 0
-1     -> 255
----------------------
NOTE: Java doesn't support unsigned bytes so int must be used to get an unsigned byte
sourceraw docstring

bytes->bitsetclj

(bytes->bitset bytes)
Creates a bitset from a seq of <bytes>
---------------------------------
bytes        -> bitset
---------------------------------
[2r00000001] -> [0 0 0 0 0 0 0 1]
[2r01101101] -> [0 1 1 0 1 1 0 1]
---------------------------------
sourceraw docstring

char->digitclj

(char->digit c radix)

Given a <radix>, convert character <c> to a digit.

Given a <radix>, convert character <c> to a digit.
sourceraw docstring

int->uintclj

(int->uint x)
source

long->ulongclj

(long->ulong x)
source

nibble->charclj

(nibble->char nibble radix)
source

nibbles->charsclj

(nibbles->chars nibbles)
(nibbles->chars nibbles radix)
Returns a seq of chars from a sequence (or array) of <nibbles> with <radix> base.
 If radix is not supplied, 10 is assumed.
--------------------------------------------------
nibbles       -> chars
--------------------------------------------------
[1 0]         -> (1 0)     ... <radix> 16 (hex)
[10 11 1 2 3] -> (A B 1 2 3)  ... <radix> 16 (hex)
[1 0]         -> (1 0)     ... <radix> 2 (binary)
[1 0 0 1]     -> (1 0 0 1)   ... <radix> 2 (binary)
[1 0]         -> (1 0)     ... <radix> 10 (decimal)
[0 1 2 3 4 5] -> (0 1 2 3 4 5) ... <radix> 10 (decimal)
--------------------------------------------------
sourceraw docstring

nibbles->strclj

(nibbles->str nibbles)
(nibbles->str nibbles radix)
Returns a string from a sequence (or array) of <nibbles> with <radix> base.
 If radix is not supplied, 10 is assumed
--------------------------------------------------
nibbles       -> str
--------------------------------------------------
[1 0]         -> '10'     ... <radix> 16 (hex)
[10 11 1 2 3] -> 'AB123'  ... <radix> 16 (hex)
[1 0]         -> '10'     ... <radix> 2 (binary)
[1 0 0 1]     -> '1001'   ... <radix> 2 (binary)
[1 0]         -> '10'     ... <radix> 10 (decimal)
[0 1 2 3 4 5] -> '012345' ... <radix> 10 (decimal)
--------------------------------------------------
sourceraw docstring

parse-uintclj

(parse-uint x)
source

parse-ulongclj

(parse-ulong x)
source

short->ushortclj

(short->ushort x)
source

str->nibblesclj

(str->nibbles s)
(str->nibbles s radix)
Returns a sequence of <nibbles> with <radix> base from a string
 If radix is not supplied, 10 is assumed.
--------------------------------------------------
str      -> nibbles
--------------------------------------------------
'10'     -> [1 0]         ... <radix> 16 (hex)
'AB123'  -> [10 11 1 2 3] ... <radix> 16 (hex)
'10'     -> [1 0]         ... <radix> 2 (binary)
'1001'   -> [1 0 0 1]     ... <radix> 2 (binary)
'10'     -> [1 0]         ... <radix> 10 (decimal)
'012345' -> [0 1 2 3 4 5] ... <radix> 10 (decimal)
--------------------------------------------------
sourceraw docstring

ubyte->byteclj

(ubyte->byte b)
Get the signed byte value of an unsigned int <x>.
-----------------
int  -> byte
-----------------
0    -> 0
127  -> 127
-128 -> -128
255  -> -1
-129 -> Exception
-----------------
sourceraw docstring

ubyte?clj

source

uint->intclj

(uint->int x)
source

uint?clj

source

ulong->longclj

(ulong->long x)
source

ulong?clj

source

ushort->shortclj

(ushort->short x)
source

ushort?clj

source

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

× close