Encodes and decodes data for storage. Clojure implementation
Encodes and decodes data for storage. Clojure implementation
Encodes and decodes data for storage. ClojureScript implementation
Encodes and decodes data for storage. ClojureScript implementation
(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.
(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.
(body this)
Returns a byte array containing the encoded data
Returns a byte array containing the encoded data
(header this len)
Returns a byte array containing a header
Returns a byte array containing a header
(encapsulate-id this)
Returns an ID that encapsulates the type
Returns an ID that encapsulates the type
(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)]
Number of nanoseconds in a millisecond
Number of nanoseconds in a millisecond
A map of types to encoding functions
A map of types to encoding functions
(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
(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
(type-code o)
Returns a code number for an object
Returns a code number for an object
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close