Liking cljdoc? Tell your friends :D

clj-cbor.header

Functions for reading and writing CBOR headers.

Functions for reading and writing CBOR headers.
raw docstring

decodeclj

(decode header)

Determines the major type keyword and additional information encoded by the header byte. §2.1

Determines the major type keyword and additional information encoded by the
header byte. §2.1
sourceraw docstring

major-typesclj

Vector of major type keywords, indexed by the three-bit values 0-7. (§2.1)

Vector of major type keywords, indexed by the three-bit values 0-7. (§2.1)
sourceraw docstring

read-codeclj

(read-code input info)

Reads a size value from the initial bytes of the input stream. Returns either a number, the keyword :indefinite, or calls the error handler on reserved info codes.

Reads a size value from the initial bytes of the input stream. Returns
either a number, the keyword `:indefinite`, or calls the error handler on
reserved info codes.
sourceraw docstring

writeclj

(write out mtype i)

Writes a header byte for the given major-type, plus extra bytes to encode the given integer code. Always writes the smallest possible representation. Returns the number of bytes written.

Writes a header byte for the given major-type, plus extra bytes to encode
the given integer code. Always writes the smallest possible representation.
Returns the number of bytes written.
sourceraw docstring

write-leaderclj

(write-leader out mtype info)

Writes a header byte for the given major-type and additional info numbers. Returns the number of bytes written.

Writes a header byte for the given major-type and additional info numbers.
Returns the number of bytes written.
sourceraw docstring

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

× close