Liking cljdoc? Tell your friends :D

fress.api


*write-utf8-tag*clj/s

source

->utf8clj

(->utf8 s)

Positional factory function for class fress.api.utf8.

Positional factory function for class fress.api.utf8.
sourceraw 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.
sourceraw 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.
sourceraw docstring

byte-streamclj/s

(byte-stream)
source

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
sourceraw 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)
sourceraw docstring

end-listclj/s

(end-list writer)

Ends a list begun with begin-closed-list.

Ends a list begun with begin-closed-list.
sourceraw 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})
sourceraw docstring

flush-tocljs

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

fn->read-handlerclj

(fn->read-handler f)
source

fn->write-handlerclj

(fn->write-handler f)
source

private-fieldclj

(private-field obj name-string)
source

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
sourceraw 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
sourceraw 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.
sourceraw 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
sourceraw docstring

read-objectclj/s

(read-object rdr)

Read a single object from a fressian reader.

Read a single object from a fressian reader.
sourceraw 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
sourceraw 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.
sourceraw 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.
sourceraw 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.
sourceraw 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.
sourceraw docstring

utf8-writerclj

(utf8-writer w u)
source

utf8?clj

(utf8? o)
source

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.
sourceraw 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
sourceraw 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
sourceraw 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.
sourceraw docstring

write-tagclj/s

(write-tag writer tag field-count)

for use in custom write handlers

for use in custom write handlers
sourceraw 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
sourceraw docstring

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

× close