Liking cljdoc? Tell your friends :D

fress.api


*write-utf8-tag*clj/s


->utf8clj

(->utf8 s)

Positional factory function for class fress.api.utf8.

Positional factory function for class fress.api.utf8.
raw docstring

begin-closed-listclj/s

(begin-closed-list writer)

Begin writing a fressianed list. To end the list, call end-list. Used to write sequential data whose size is not known in advance.

Begin writing a fressianed list.  To end the list, call end-list.
Used to write sequential data whose size is not known in advance.
raw docstring

begin-open-listclj/s

(begin-open-list writer)

Writes fressian code to begin an open list. An open list can be terminated either by a call to end-list, or by simply closing the stream. Used to write sequential data whose size is not known in advance, in contexts where stream failure can safely be interpreted as end of list.

Writes fressian code to begin an open list.  An
open list can be terminated either by a call to end-list,
or by simply closing the stream.  Used to write sequential
data whose size is not known in advance, in contexts where
stream failure can safely be interpreted as end of list.
raw docstring

byte-streamclj/s

(byte-stream)

create-readerclj/s

(create-reader in & opts)

Create a fressian reader targeting in.

  • :handlers is just a map of tag->fn merged with default read handlers
  • :checksum? {boolean} :: maintain a checksum for each byte read, validated when footer received. throws when fails. If no footer, has no effect
  • :name->map-ctor map of record names to map->Record constructors at runtime {'string-name' map->some-record}
  • cljs allows reading from :offset
Create a fressian reader targeting in.
- :handlers is just a map of tag->fn merged with default read handlers
- :checksum? {boolean} :: maintain a checksum for each byte read, validated
  when footer received. throws when fails. If no footer, has no effect
- :name->map-ctor map of record names to map->Record constructors at runtime
    {'string-name' map->some-record}
- cljs allows reading from :offset
raw docstring

create-writerclj/s

(create-writer out & opts)

Create a fressian writer targeting out.

  • :handlers is just a map of {type {'tag' write-fn}} merged with default write handlers
  • :record->name (cljs only) map of record ctor to string-name (the string version of the record's fully resolved symbol)
Create a fressian writer targeting out.
- :handlers is just a map of {type {'tag' write-fn}} merged with default
  write handlers
- :record->name (cljs only) map of record ctor to string-name (the string
  version of the record's fully resolved symbol)
raw docstring

end-listclj/s

(end-list writer)

Ends a list begun with begin-closed-list.

Ends a list begun with begin-closed-list.
raw docstring

field-caching-writerclj/s

(field-caching-writer cache-pred)

Returns a record writer that caches values for keys matching cache-pred, which is typically specified as a set, e.g. (field-caching-writer #{:color})

Returns a record writer that caches values for keys
matching cache-pred, which is typically specified
as a set, e.g. (field-caching-writer #{:color})
raw docstring

flush-tocljs

(flush-to stream out)
(flush-to stream out offset)

fn->read-handlerclj

(fn->read-handler f)

fn->write-handlerclj

(fn->write-handler f)

private-fieldclj

(private-field obj name-string)

readclj/s

(read readable & options)

Convenience method for reading a single fressian object. Takes same options as create-reader

Convenience method for reading a single fressian object.
Takes same options as create-reader
raw docstring

read-allclj/s

(read-all in & options)

like read-batch but accepts readables in addition to FressianReaders

like read-batch but accepts readables in addition to FressianReaders
raw docstring

read-batchclj/s

(read-batch fin)

Read a fressian reader fully (until eof), returning a (possibly empty) vector of results.

Read a fressian reader fully (until eof), returning a (possibly empty)
vector of results.
raw docstring

read-handlersclj

(read-handlers)
(read-handlers user-handlers)

merge in user handlers with default-handlers, wrap for fressian lookup

merge in user handlers with default-handlers, wrap for fressian lookup
raw docstring

read-objectclj/s

(read-object rdr)

Read a single object from a fressian reader.

Read a single object from a fressian reader.
raw docstring

reset-cachesclj/s

(reset-caches writer)

write a signal to the reader to forget established cache codes

write a signal to the reader to forget established cache codes
raw docstring

tagclj/s

(tag o)

Returns the tag if object is a tagged-object, else nil.

Returns the tag if object is a tagged-object, else nil.
raw docstring

tagged-object?clj/s

(tagged-object? o)

Returns true if o is a tagged object, which will occur when the reader does not recognized a specific type. Use tag and tagged-value to access the contents of a tagged-object.

Returns true if o is a tagged object, which will occur when
the reader does not recognized a specific type.  Use tag
and tagged-value to access the contents of a tagged-object.
raw docstring

tagged-valueclj/s

(tagged-value o)

Returns the value (an Object array) wrapped by obj, or nil if obj is not a tagged object.

Returns the value (an Object array) wrapped by obj, or nil
if obj is not a tagged object.
raw docstring

utf8-readerclj

(utf8-reader rdr tag _)

cant modify fressian.impl.Codes so using code from client will fail JVM readers must use "utf8" tag.

cant modify fressian.impl.Codes so using code from client will fail
JVM readers must use "utf8" tag.
raw docstring

utf8-writerclj

(utf8-writer w u)

utf8?clj

(utf8? o)

writeclj/s

(write obj & options)

Convenience method for writing a single object. Returns a byte buffer. Options are the same as for create-reader, with one additional option :footer? {bool}, if specified will write a fressian footer after writing the object.

Convenience method for writing a single object.  Returns a
byte buffer.  Options are the same as for create-reader,
with one additional option :footer? {bool}, if specified will
write a fressian footer after writing the object.
raw docstring

(write-footer writer)

use to seal off a writer with a final byte count & checksum for verification by a reader. Induces EOF

use to seal off a writer with a final byte count & checksum for
verification by a reader. Induces EOF
raw docstring

write-handlersclj

(write-handlers)
(write-handlers user-handlers)

merge in user handlers with default-handlers, wrap for fressian lookup

merge in user handlers with default-handlers, wrap for fressian lookup
raw docstring

write-objectclj/s

(write-object writer o)
(write-object writer o cache?)

Write a single object to a fressian writer.

Write a single object to a fressian writer.
raw docstring

write-tagclj/s

(write-tag writer tag field-count)

for use in custom write handlers

for use in custom write handlers
raw docstring

write-utf8clj/s

(write-utf8 writer s)
(write-utf8 writer s cache?)

write a string as raw utf-8 bytes

write a string as raw utf-8 bytes
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close