taoensso.nippy documentation

Simple, high-performance Clojure serialization library. Adapted from
Deep-Freeze.

coll-freezer

macro

(coll-freezer type id & body)
Extends Freezable to simple collection types.

coll-thaw!

(coll-thaw! s)
Thaws simple collection types.

coll-thaw-kvs!

(coll-thaw-kvs! s)
Thaws key-value collection types.

freeze-to-bytes

(freeze-to-bytes x & {:keys [compress? print-dup? password], :or {compress? true, print-dup? true}})
Serializes x to a byte array and returns the array.

freeze-to-stream!

(freeze-to-stream! data-output-stream x)(freeze-to-stream! data-output-stream x print-dup?)
Serializes x to given output stream.

freezer

macro

(freezer type id & body)
Helper to extend Freezable protocol.

kv-freezer

macro

(kv-freezer type id & body)
Extends Freezable to key-value collection types.

stress-data

Reference data used for tests & benchmarks.

thaw-from-bytes

(thaw-from-bytes ba & {:keys [compressed? read-eval? password], :or {compressed? true, read-eval? false}})
Deserializes an object from given byte array.

thaw-from-stream!

(thaw-from-stream! data-input-stream read-eval?)
Deserializes an object from given input stream.