Liking cljdoc? Tell your friends :D

deed.core


->optionsclj

(->options opts)

Build an Options object out from a map or nil.

Build an Options object out from a map or nil.
sourceraw docstring

-decodecljmultimethod

source

decodeclj

(decode decoder)

Decode a single object from the decoder. When no items left, return an instance of EOF object.

Decode a single object from the decoder. When
no items left, return an instance of EOF object.
sourceraw docstring

decode-fromclj

(decode-from src)
(decode-from src options)

Decode a single value from the src source (a file, an input stream, etc).

Decode a single value from the `src` source (a file,
an input stream, etc).
sourceraw docstring

decode-seqclj

(decode-seq d)

Get a lazy sequence of decoded values out from a Decoder instance.

Get a lazy sequence of decoded values out from
a `Decoder` instance.
sourceraw docstring

decode-seq-fromclj

(decode-seq-from src)
(decode-seq-from src options)

Encode multiple values from the src source as a vector.

Encode multiple values from the `src` source as
a vector.
sourceraw docstring

decoderclj

(decoder src)
(decoder src options)

Make a Decoder instance. The src is anything that can be transformed into an InputStream using the io/input-stream function. The options is either a Clojure map or nil.

Make a `Decoder` instance. The `src` is anything
that can be transformed into an `InputStream`
using the `io/input-stream` function. The `options`
is either a Clojure map or nil.
sourceraw docstring

encodeclj

(encode encoder x)

Encode a single object.

Encode a single object.
sourceraw docstring

encode-seqclj

(encode-seq encoder coll)

Encode a sequence of objects so they can be read one by one later on. Return the number of objects written.

Encode a sequence of objects so they can be
read one by one later on. Return the number
of objects written.
sourceraw docstring

encode-seq-toclj

(encode-seq-to xs out)
(encode-seq-to xs out options)

Encode multiple values into the out destination. Return a number of values written.

Encode multiple values into the `out` destination.
Return a number of values written.
sourceraw docstring

encode-seq-to-bytesclj

(encode-seq-to-bytes xs)
(encode-seq-to-bytes xs options)

Encode multiple values into a byte array.

Encode multiple values into a byte array.
sourceraw docstring

encode-toclj

(encode-to x out)
(encode-to x out options)

Encode a single value into the out destination (a file, a stream, etc).

Encode a single value into the `out` destination
(a file, a stream, etc).
sourceraw docstring

encode-to-bytesclj

(encode-to-bytes x)
(encode-to-bytes x options)

Encode a single value into a byte array.

Encode a single value into a byte array.
sourceraw docstring

encoderclj

(encoder out)
(encoder out options)

Make an Encoder instance. The out is anything that can be transformed into an OutputStream using the io/output-stream function. The options is either a Clojure map or nil.

Make an `Encoder` instance. The `out` is anything
that can be transformed into an `OutputStream`
using the `io/output-stream` function. The `options`
is either a Clojure map or nil.
sourceraw docstring

eof?clj

(eof? x)

True if the object is EOF.

True if the object is EOF.
sourceraw docstring

expand-decodecljmacro

(expand-decode [OID decoder] & body)

A helper macro to expand decoding logic for a certain numeric code.

Arguments:

  • the OID is a Short unique number describing the type;
  • the decoder is a symbol bound to the current Decoder instance.

The body must read fields by calling either top-level decode function or low-level .readInteger, .readString, and other methods, and construct the final value out from them.

A helper macro to expand decoding logic for a certain
numeric code.

Arguments:
- the `OID` is a Short unique number describing the type;
- the `decoder` is a symbol bound to the current `Decoder`
  instance.

The body must read fields by calling either top-level `decode`
function or low-level `.readInteger`, `.readString`, and other
methods, and construct the final value out from them.
sourceraw docstring

expand-encodecljmacro

(expand-encode [OID Type encoder value] & body)

A helper macro to expand encoding logic for a certain type.

Arguments:

  • the OID is a Short unique number describing the type;
  • the Type is a class;
  • the encoder is a symbol bound to the current Encoder instance;
  • the value is a symbol bound to the current instance of class Type.

The body must encode inner fields of the object using ether top-level encode function or by calling the low-level .writeInt, .writeString, and other methods.

A helper macro to expand encoding logic for a
certain type.

Arguments:
- the `OID` is a Short unique number describing the type;
- the `Type` is a class;
- the `encoder` is a symbol bound to the current `Encoder`
  instance;
- the `value` is a symbol bound to the current instance
  of class `Type`.

The body must encode inner fields of the object using
ether top-level `encode` function or by calling the low-level
`.writeInt`, `.writeString`, and other methods.

sourceraw docstring

gzip-input-streamclj

(gzip-input-stream src)
source

gzip-output-streamclj

(gzip-output-stream out)
source

handle-recordcljmacro

(handle-record OID RecordClass)

Extend both encode & decode logic so they support a custom defrecord class. Specify the custom OID number and the class object.

Usage:

(defrecord MyCustomRecord [id size sku] ...)

(handle-record 0x1234 MyCustomRecord)

Extend both encode & decode logic so they
support a custom defrecord class. Specify
the custom OID number and the class object.

Usage:

(defrecord MyCustomRecord [id size sku]
  ...)

(handle-record 0x1234 MyCustomRecord)
sourceraw docstring

header?clj

(header? x)

True if the object is a Header instance.

True if the object is a Header instance.
sourceraw docstring

IEncodecljprotocol

-encodeclj

(-encode _this encoder)
source

unsupported?clj

(unsupported? x)

True if the object is Unsupported.

True if the object is Unsupported.
sourceraw docstring

versionclj

(version decoder)

Return a version number used in the decoder.

Return a version number used in the decoder.
sourceraw docstring

with-decodercljmacro

(with-decoder [bind src options] & body)

Perform the body binding the new Decoder object to the bind symbol. The src object gets coerced to the input stream. Both encoder and the src object get closed afterwards.

Perform the body binding the new `Decoder` object
to the `bind` symbol. The `src` object gets coerced
to the input stream. Both encoder and the `src`
object get closed afterwards.
sourceraw docstring

with-encodercljmacro

(with-encoder [bind out options] & body)

Perform the body binding the new Encoder object to the bind symbol. The out object gets coerced to the output stream. Both encoder and the out object get closed afterwards.

Perform the body binding the new `Encoder` object
to the `bind` symbol. The `out` object gets coerced
to the output stream. Both encoder and the `out`
object get closed afterwards.
sourceraw docstring

writeOIDclj

(writeOID encoder oid)
source

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

× close