Liking cljdoc? Tell your friends :D

asami.durable.encoder

clj

Encodes and decodes data for storage. Clojure implementation

Encodes and decodes data for storage. Clojure implementation
cljs

Encodes and decodes data for storage. ClojureScript implementation

Encodes and decodes data for storage. ClojureScript implementation
raw docstring

*current-offset*clj

source

*entity-offsets*clj

source

*number-buffer*clj

source

*number-bytes*clj

source

byte-arraycljs

(byte-array size-or-seq)
source

comparable-mapclj

(comparable-map m)

Converts a map into a vector of the equivalent data, so it may be compared

Converts a map into a vector of the equivalent data, so it may be compared
sourceraw docstring

concat-bytesclj

(concat-bytes bas)

Takes multiple byte arrays and returns an array with all of the bytes concattenated

Takes multiple byte arrays and returns an array with all of the bytes concattenated
sourceraw docstring

constant-length?clj

The set of types that can be encoded in a constant number of bytes. Used for homogenous sequences.

The set of types that can be encoded in a constant number of bytes. Used for homogenous sequences.
sourceraw docstring

empty-bytesclj

source

encapsulate-longclj

(encapsulate-long l)

Encapsulates a long value. If the long is too large to be encapsulated, then return nil.

Encapsulates a long value. If the long is too large to be encapsulated, then return nil.
sourceraw docstring

encapsulate-sstrclj

(encapsulate-sstr s type-mask)

Encapsulates a short string. If the string cannot be encapsulated, then return nil.

Encapsulates a short string. If the string cannot be encapsulated, then return nil.
sourceraw docstring

FlatFileclj/sprotocol

bodyclj/s

(body this)

Returns a byte array containing the encoded data

Returns a byte array containing the encoded data

comparableclj/s

(comparable this)

Returns a version of this data that can be compared

Returns a version of this data that can be compared

encapsulate-idclj/s

(encapsulate-id this)

Returns an ID that encapsulates the type

Returns an ID that encapsulates the type

headerclj/s

(header this len)

Returns a byte array containing a header

Returns a byte array containing a header
source (clj)source (cljs)

general-headerclj/s

(general-header t len)

Takes a type number and a length, and encodes to the general header style. Lengths 0-255 [2r1110tttt length] Lengths 256-32k [2r1111tttt (low-byte length) (high-byte length)] Lengths 32k-2G [2r1111tttt (byte0 length) (byte1 length) (byte2 length) (byte3 length)]

Takes a type number and a length, and encodes to the general header style.
Lengths 0-255   [2r1110tttt length]
Lengths 256-32k [2r1111tttt (low-byte length) (high-byte length)]
Lengths 32k-2G  [2r1111tttt (byte0 length) (byte1 length) (byte2 length) (byte3 length)]
source (clj)source (cljs)raw docstring

map-bodyclj

(map-body this)

Common function for encoding the body of the various map types

Common function for encoding the body of the various map types
sourceraw docstring

map-headerclj

(map-header this len)

Common function for encoding the header of the various map types

Common function for encoding the header of the various map types
sourceraw docstring

max-short-lenclj

source

max-short-longclj

source

milli-nanoclj

Number of nanoseconds in a millisecond

Number of nanoseconds in a millisecond
sourceraw docstring

min-short-longclj

source

n-byte-numberclj

(n-byte-number n x)

Returns an array of n bytes representing the number x. Must be initialized for the current thread.

Returns an array of n bytes representing the number x.
Must be initialized for the current thread.
sourceraw docstring

num-bytesclj

(num-bytes n)

Determines the number of bytes that can hold a value. From 2-4 tests, this preferences small numbers.

Determines the number of bytes that can hold a value.
From 2-4 tests, this preferences small numbers.
sourceraw docstring

registered-xsd-typesclj

A map of types to encoding functions

A map of types to encoding functions
sourceraw docstring

str-constructor?clj

(str-constructor? c)

Tests if a class has a constructor that takes a string

Tests if a class has a constructor that takes a string
sourceraw docstring

to-bytesclj/s

(to-bytes o)

Returns a tuple of byte arrays, representing the header and the body

Returns a tuple of byte arrays, representing the header and the body
source (clj)source (cljs)raw docstring

to-counted-bytesclj

(to-counted-bytes o)

Returns a tuple of byte arrays, representing the header and the body

Returns a tuple of byte arrays, representing the header and the body
sourceraw docstring

type-codeclj/s

(type-code o)

Returns a code number for an object

Returns a code number for an object
source (clj)source (cljs)raw docstring

type-compareclj

(type-compare a b)

Provides a regular comparison of objects of potentially different types

Provides a regular comparison of objects of potentially different types
sourceraw docstring

zero-arrayclj

A single element byte array containing 0

A single element byte array containing 0
sourceraw docstring

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

× close