nippy/taoensso.nippy.html

22 lines
5.2 KiB
HTML
Raw Normal View History

2013-06-01 12:16:45 +00:00
<!DOCTYPE html>
2013-08-05 06:38:10 +00:00
<html><head><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>taoensso.nippy documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Nippy 2.1.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><span>Namespaces</span></h3><ul><li class="current"><a href="taoensso.nippy.html"><span>taoensso.nippy</span></a></li><li><a href="taoensso.nippy.benchmarks.html"><span>taoensso.nippy.benchmarks</span></a></li><li><a href="taoensso.nippy.compression.html"><span>taoensso.nippy.compression</span></a></li><li><a href="taoensso.nippy.encryption.html"><span>taoensso.nippy.encryption</span></a></li><li><a href="taoensso.nippy.tools.html"><span>taoensso.nippy.tools</span></a></li><li><a href="taoensso.nippy.utils.html"><span>taoensso.nippy.utils</span></a></li></ul></div><div class="sidebar" id="vars"><h3>Public Vars</h3><ul><li><a href="taoensso.nippy.html#var-extend-freeze"><span>extend-freeze</span></a></li><li><a href="taoensso.nippy.html#var-extend-thaw"><span>extend-thaw</span></a></li><li><a href="taoensso.nippy.html#var-freeze"><span>freeze</span></a></li><li><a href="taoensso.nippy.html#var-freeze-to-bytes"><span>freeze-to-bytes</span></a></li><li><a href="taoensso.nippy.html#var-freeze-to-stream%21"><span>freeze-to-stream!</span></a></li><li><a href="taoensso.nippy.html#var-stress-data"><span>stress-data</span></a></li><li><a href="taoensso.nippy.html#var-thaw"><span>thaw</span></a></li><li><a href="taoensso.nippy.html#var-thaw-from-bytes"><span>thaw-from-bytes</span></a></li><li><a href="taoensso.nippy.html#var-thaw-from-stream%21"><span>thaw-from-stream!</span></a></li></ul></div><div class="namespace-docs" id="content"><h2>taoensso.nippy documentation</h2><pre class="doc">Simple, high-performance Clojure serialization library. Originally adapted
from Deep-Freeze.</pre><div class="public" id="var-extend-freeze"><h3>extend-freeze</h3><h4 class="macro">macro</h4><div class="usage"><code>(extend-freeze type custom-type-id [x stream] &amp; body)</code></div><pre class="doc">Alpha - subject to change.
Extends Nippy to support freezing of a custom type with id ∈[1, 128]:
(defrecord MyType [data])
(extend-freeze MyType 1 [x data-output-stream]
(.writeUTF [data-output-stream] (:data x)))</pre></div><div class="public" id="var-extend-thaw"><h3>extend-thaw</h3><h4 class="macro">macro</h4><div class="usage"><code>(extend-thaw custom-type-id [stream] &amp; body)</code></div><pre class="doc">Alpha - subject to change.
Extends Nippy to support thawing of a custom type with id ∈[1, 128]:
(extend-thaw 1 [data-input-stream]
(-&gt;MyType (.readUTF data-input-stream)))</pre></div><div class="public" id="var-freeze"><h3>freeze</h3><div class="usage"><code>(freeze x &amp; [{:keys [print-dup? password compressor encryptor legacy-mode], :or {print-dup? true, compressor snappy-compressor, encryptor aes128-encryptor}}])</code></div><pre class="doc">Serializes arg (any Clojure data type) to a byte array. Set :legacy-mode to
true to produce bytes readble by Nippy &lt; 2.x. For custom types extend the
Clojure reader or see `extend-freeze`.</pre></div><div class="public" id="var-freeze-to-bytes"><h3>freeze-to-bytes</h3><div class="usage"><code>(freeze-to-bytes x &amp; {:keys [print-dup? compress?], :or {print-dup? true, compress? true}})</code></div><pre class="doc">DEPRECATED: Use `freeze` instead.
</pre></div><div class="public" id="var-freeze-to-stream%21"><h3>freeze-to-stream!</h3><div class="usage"><code>(freeze-to-stream! data-output-stream x &amp; [{:keys [print-dup?], :or {print-dup? true}}])</code></div><pre class="doc">Low-level API. Serializes arg (any Clojure data type) to a DataOutputStream.
2013-06-01 12:16:45 +00:00
</pre></div><div class="public" id="var-stress-data"><h3>stress-data</h3><div class="usage"></div><pre class="doc">Reference data used for tests &amp; benchmarks.
2013-08-05 06:38:10 +00:00
</pre></div><div class="public" id="var-thaw"><h3>thaw</h3><div class="usage"><code>(thaw ba &amp; [{:keys [read-eval? password compressor encryptor legacy-opts readers], :or {legacy-opts {:compressed? true}, compressor snappy-compressor, encryptor aes128-encryptor}, :as opts}])</code></div><pre class="doc">Deserializes a frozen object from given byte array to its original Clojure
data type. Supports data frozen with current and all previous versions of
Nippy. For custom types extend the Clojure reader or see `extend-thaw`.
2013-06-13 09:49:09 +00:00
WARNING: Enabling `:read-eval?` can lead to security vulnerabilities unless
2013-06-16 12:36:29 +00:00
you are sure you know what you're doing.</pre></div><div class="public" id="var-thaw-from-bytes"><h3>thaw-from-bytes</h3><div class="usage"><code>(thaw-from-bytes ba &amp; {:keys [read-eval? compressed?], :or {compressed? true}})</code></div><pre class="doc">DEPRECATED: Use `thaw` instead.
2013-08-05 06:38:10 +00:00
</pre></div><div class="public" id="var-thaw-from-stream%21"><h3>thaw-from-stream!</h3><div class="usage"><code>(thaw-from-stream! data-input-stream &amp; [{:keys [read-eval?]}])</code></div><pre class="doc">Low-level API. Deserializes a frozen object from given DataInputStream to its
original Clojure data type.</pre></div></div></body></html>