Liking cljdoc? Tell your friends :D

asami.durable.decoder

Encodes and decodes data for storage. Clojure implementation

Encodes and decodes data for storage. Clojure implementation
raw docstring

as-byteclj

(as-byte n)
source

bigdec-decoderclj

(bigdec-decoder ext paged-rdr pos)
source

bigint-decoderclj

(bigint-decoder ext paged-rdr pos)
source

blob-decoderclj

(blob-decoder ext paged-rdr pos)
source

bytes->longcljs

(bytes->long bytes)
source

bytes->strcljs

(bytes->str bytes)
source

date-decoderclj/s

(date-decoder ext paged-rdr pos)
source (clj)source (cljs)

decode-lengthclj/s≠

(decode-length ext paged-rdr pos)
clj

Reads the header to determine length. ext: if true (bit is 0) then length is a byte, if false (bit is 1) then length is in either a short or an int pos: The beginning of the data. This has skipped the type byte. returns: a pair of the header length and the data length.

Reads the header to determine length.
ext: if true (bit is 0) then length is a byte, if false (bit is 1) then length is in either a short or an int
pos: The beginning of the data. This has skipped the type byte.
returns: a pair of the header length and the data length.
cljs

Reads the header to determine length. ext: if 0 then length is a byte, if 1 then length is in either a short or an int

Reads the header to determine length.
ext: if 0 then length is a byte, if 1 then length is in either a short or an int
source (clj)source (cljs)raw docstring

decode-length-nodeclj/s≠

clj
(decode-length-node data)

Reads the header to determine length. data: The complete buffer to decode, including the type byte. returns: the length, or a lower bound on the length

Reads the header to determine length.
data: The complete buffer to decode, including the type byte.
returns: the length, or a lower bound on the length
cljs
(decode-length-node b)
source (clj)source (cljs)raw docstring

default-decoderclj/s

(default-decoder ext paged-rdr pos)

This is a decoder for unsupported data that has a string constructor

This is a decoder for unsupported data that has a string constructor
source (clj)source (cljs)raw docstring

double-decoderclj

(double-decoder ext paged-rdr pos)
source

encapsulated-node?clj/s

(encapsulated-node? id)
source (clj)source (cljs)

extract-longclj

(extract-long id)

Extract a long number from an encapsulating ID

Extract a long number from an encapsulating ID
sourceraw docstring

extract-nodeclj

(extract-node id)
source

extract-sstrclj

(extract-sstr id)

Extract a short string from an encapsulating ID

Extract a short string from an encapsulating ID
sourceraw docstring

instant-decoderclj/s

(instant-decoder ext paged-rdr pos)
source (clj)source (cljs)

instant-lengthclj/s

source (clj)source (cljs)

keyword-decoderclj/s

(keyword-decoder ext paged-rdr pos)
source (clj)source (cljs)

lneg-bitsclj

source

long-bytes-compareclj/s

(long-bytes-compare type-left left-header left-body left-object right-bytes)

Compare data from 2 values that are the same type. If the data cannot give a result then return 0. Operates on an array, expected to be in an index node.

Compare data from 2 values that are the same type. If the data cannot give a result
then return 0. Operates on an array, expected to be in an index node.
source (clj)source (cljs)raw docstring

long-decoderclj/s

(long-decoder ext paged-rdr pos)
source (clj)source (cljs)

long-nbitclj

source

map-decoderclj

(map-decoder ext paged-rdr pos)

A decoder for maps. Returns the map and the bytes read.

A decoder for maps. Returns the map and the bytes read.
sourceraw docstring

nybble-maskclj

source

partials-lenclj

(partials-len bs)
(partials-len bs len)

Determine the number of bytes that form a partial character at the end of a UTF-8 byte array. The len argument is the defined length of the full string, but that may be greater than the bytes provided.

Determine the number of bytes that form a partial character at the end of a UTF-8 byte array.
The len argument is the defined length of the full string, but that may be greater than the bytes provided.
sourceraw docstring

read-keywordclj/s

(read-keyword paged-rdr pos len)
source (clj)source (cljs)

read-longclj

(read-long paged-rdr pos len)

Raw reading of big-endian bytes into a long

Raw reading of big-endian bytes into a long
sourceraw docstring

read-objectclj/s

(read-object paged-rdr pos)

Reads an object from a paged-reader, at id=pos

Reads an object from a paged-reader, at id=pos
source (clj)source (cljs)raw docstring

read-object-sizeclj

(read-object-size paged-rdr pos)

Reads an object from a paged-reader, at id=pos. Returns both the object and it's length.

Reads an object from a paged-reader, at id=pos. Returns both the object and it's length.
sourceraw docstring

read-strclj/s

(read-str paged-rdr pos len)
source (clj)source (cljs)

read-uriclj/s

(read-uri paged-rdr pos len)
source (clj)source (cljs)

seq-decoderclj

(seq-decoder ext paged-rdr pos)

This is a decoder for sequences of data. Use a vector as the sequence.

This is a decoder for sequences of data. Use a vector as the sequence.
sourceraw docstring

string-decoderclj/s

(string-decoder ext paged-rdr pos)
source (clj)source (cljs)

string-style-compareclj

(string-style-compare left-s right-bytes)

Compare the string form of an object with bytes that store the string form of an object

Compare the string form of an object with bytes that store the string form of an object
sourceraw docstring

type-infoclj/s≠

clj
(type-info b)

Returns the type information encoded in a header-byte

Returns the type information encoded in a header-byte
cljs
(type-info data)
source (clj)source (cljs)raw docstring

type-nybble-shiftclj

source

typecode->decoderclj/s≠

clj

Map of type codes to decoder functions. Returns object and bytes read.

Map of type codes to decoder functions. Returns object and bytes read.
cljs

Map of type codes to decoder functions

Map of type codes to decoder functions
source (clj)source (cljs)raw docstring

unencapsulate-idclj/s≠

clj
(unencapsulate-id id)

Converts an encapsulating ID into the object it encapsulates. Return nil if it does not encapsulate anything.

Converts an encapsulating ID into the object it encapsulates. Return nil if it does not encapsulate anything.
cljs
(unencapsulate-id x)
source (clj)source (cljs)raw docstring

uri-decoderclj/s

(uri-decoder ext paged-rdr pos)
source (clj)source (cljs)

uuid-decoderclj/s

(uuid-decoder ext paged-rdr pos)
source (clj)source (cljs)

xsd-decoderclj

(xsd-decoder ext paged-rdr pos)
source

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

× close