Functions for reading and writing CBOR headers.
Functions for reading and writing CBOR headers.
(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
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)
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close