Nippy 2.12.0-beta1
High-performance serialization library for Clojure.
Installation
To install, add the following dependency to your project or build file:
[com.taoensso/nippy "2.12.0-beta1"]
Namespaces
taoensso.nippy
High-performance serialization library for Clojure
Public variables and functions:
- *auto-freeze-compressor*
- *custom-readers*
- *final-freeze-fallback*
- *freeze-fallback*
- ->CacheWrapped
- ->StressRecord
- aes128-encryptor
- cache
- compress
- decompress
- decrypt
- encrypt
- extend-freeze
- extend-thaw
- fast-freeze
- fast-thaw
- Freezable
- freezable?
- freeze
- freeze-fallback-as-str
- freeze-to-out!
- inspect-ba
- lz4-compressor
- lz4hc-compressor
- lzma2-compressor
- map->CacheWrapped
- map->StressRecord
- set-auto-freeze-compressor!
- set-freeze-fallback!
- snappy-compressor
- stress-data
- stress-data-benchable
- stress-data-comparable
- swap-custom-readers!
- thaw
- thaw-from-in!
- throw-unfreezable
- try-write-readable
- try-write-serializable
- write-id
- write-unfreezable
taoensso.nippy.encryption
Simple no-nonsense crypto with reasonable defaults
Public variables and functions:
taoensso.nippy.tools
Utils for 3rd-party tools that want to add user-configurable Nippy support. +Nippy 2.12.0-RC1 Generated by Codox
Nippy 2.12.0-RC1
\ No newline at end of file diff --git a/taoensso.nippy.benchmarks.html b/taoensso.nippy.benchmarks.html index d686f4f..fe93680 100644 --- a/taoensso.nippy.benchmarks.html +++ b/taoensso.nippy.benchmarks.html @@ -1,3 +1,3 @@ -Nippy 2.12.0-RC1
High-performance serialization library for Clojure.
Installation
To install, add the following dependency to your project or build file:
[com.taoensso/nippy "2.12.0-RC1"]Namespaces
taoensso.nippy
High-performance serialization library for ClojurePublic variables and functions:
- *auto-freeze-compressor*
- *custom-readers*
- *final-freeze-fallback*
- *freeze-fallback*
- ->CacheWrapped
- ->StressRecord
- aes128-encryptor
- cache
- compress
- decompress
- decrypt
- encrypt
- extend-freeze
- extend-thaw
- fast-freeze
- fast-thaw
- Freezable
- freezable?
- freeze
- freeze-fallback-as-str
- freeze-to-out!
- inspect-ba
- lz4-compressor
- lz4hc-compressor
- lzma2-compressor
- map->CacheWrapped
- map->StressRecord
- set-auto-freeze-compressor!
- set-freeze-fallback!
- snappy-compressor
- stress-data
- stress-data-benchable
- stress-data-comparable
- swap-custom-readers!
- thaw
- thaw-from-in!
- throw-unfreezable
- try-write-readable
- try-write-serializable
- write-id
- write-unfreezable
taoensso.nippy.encryption
Simple no-nonsense crypto with reasonable defaultsPublic variables and functions:
taoensso.nippy.tools
Utils for 3rd-party tools that want to add user-configurable Nippy support. Used by Carmine, Faraday, etc.Public variables and functions:
taoensso.nippy.benchmarks documentation Generated by Codox
Nippy 2.12.0-beta1
\ No newline at end of file +taoensso.nippy.benchmarks
taoensso.nippy.benchmarks documentation Generated by Codox
Nippy 2.12.0-RC1
\ No newline at end of file diff --git a/taoensso.nippy.compression.html b/taoensso.nippy.compression.html index b0e2aa1..0409373 100644 --- a/taoensso.nippy.compression.html +++ b/taoensso.nippy.compression.html @@ -1,6 +1,6 @@ -taoensso.nippy.benchmarks
taoensso.nippy.compression documentation Generated by Codox
Nippy 2.12.0-beta1
taoensso.nippy.compression
->LZ4Compressor
(->LZ4Compressor compressor decompressor)Positional factory function for class taoensso.nippy.compression.LZ4Compressor. +taoensso.nippy.compression documentation Generated by Codox
Nippy 2.12.0-RC1
taoensso.nippy.compression
->LZ4Compressor
(->LZ4Compressor compressor decompressor)Positional factory function for class taoensso.nippy.compression.LZ4Compressor.->LZMA2Compressor
(->LZMA2Compressor compression-level)Positional factory function for class taoensso.nippy.compression.LZMA2Compressor.->SnappyCompressor
(->SnappyCompressor)Positional factory function for class taoensso.nippy.compression.SnappyCompressor.ICompressor
protocol
members
compress
(compress compressor ba)decompress
(decompress compressor ba)header-id
(header-id compressor)lz4-compressor
Default net.jpountz.lz4 compressor: diff --git a/taoensso.nippy.encryption.html b/taoensso.nippy.encryption.html index 39b1b15..6732a2c 100644 --- a/taoensso.nippy.encryption.html +++ b/taoensso.nippy.encryption.html @@ -1,6 +1,6 @@ -taoensso.nippy.encryption documentation Generated by Codox
Nippy 2.12.0-beta1
taoensso.nippy.encryption
\ No newline at end of file diff --git a/taoensso.nippy.tools.html b/taoensso.nippy.tools.html index abd09b2..d82b186 100644 --- a/taoensso.nippy.tools.html +++ b/taoensso.nippy.tools.html @@ -1,9 +1,9 @@ -Simple no-nonsense crypto with reasonable defaults +taoensso.nippy.encryption documentation Generated by Codox
Nippy 2.12.0-RC1
\ No newline at end of file diff --git a/taoensso.nippy.html b/taoensso.nippy.html index c769359..e2332d5 100644 --- a/taoensso.nippy.html +++ b/taoensso.nippy.html @@ -1,13 +1,13 @@ -taoensso.nippy.encryption
Simple no-nonsense crypto with reasonable defaults->AES128Encryptor
(->AES128Encryptor header-id keyfn cached-keyfn)Positional factory function for class taoensso.nippy.encryption.AES128Encryptor.aes128-encryptor
Default 128bit AES encryptor with many-round SHA-512 key-gen. @@ -35,6 +35,6 @@ CONS: Using a small number of keys for many encrypted items means that if any compromised. Faster than `aes128-salted`, and harder to attack any particular key - but -increased danger if a key is somehow compromised.IEncryptor
protocol
members
decrypt
(decrypt encryptor pwd ba)encrypt
(encrypt encryptor pwd ba)header-id
(header-id encryptor)map->AES128Encryptor
(map->AES128Encryptor m__8448__auto__)Factory function for class taoensso.nippy.encryption.AES128Encryptor, taking a map of keywords to field values. +increased danger if a key is somehow compromised.IEncryptor
protocol
members
decrypt
(decrypt encryptor pwd ba)encrypt
(encrypt encryptor pwd ba)header-id
(header-id encryptor)map->AES128Encryptor
(map->AES128Encryptor m__8454__auto__)Factory function for class taoensso.nippy.encryption.AES128Encryptor, taking a map of keywords to field values.taoensso.nippy documentation Generated by Codox
Nippy 2.12.0-beta1
taoensso.nippy
High-performance serialization library for Clojure +taoensso.nippy documentation Generated by Codox
Nippy 2.12.0-RC1
\ No newline at end of file +want `thaw` instead.taoensso.nippy
High-performance serialization library for Clojure*auto-freeze-compressor*
dynamic
(fn [byte-array])->compressor used by `(freeze <x> {:compressor :auto}), nil => default->CacheWrapped
(->CacheWrapped value)Positional factory function for class taoensso.nippy.CacheWrapped. -->StressRecord
(->StressRecord data)Positional factory function for class taoensso.nippy.StressRecord. -->StressRecord
(->StressRecord data)Positional factory function for class taoensso.nippy.StressRecord. +aes128-encryptor
Default 128bit AES encryptor with many-round SHA-512 key-gen. Password form [:salted "my-password"] --------------------------------------- @@ -44,7 +44,7 @@ increased danger if a key is somehow compromised.extend-freeze
macro
(extend-freeze type custom-type-id [x out] & body)Extends Nippy to support freezing of a custom type (ideally concrete) with + will incl. a single "foo", plus 2x single-byte references to "foo".extend-freeze
macro
(extend-freeze type custom-type-id [x out] & body)Extends Nippy to support freezing of a custom type (ideally concrete) with given id of form: * Keyword - 2 byte overhead, resistent to id collisions * Integer ∈[1, 128] - no overhead, subject to id collisions @@ -54,23 +54,23 @@ given id of form: (.writeUTF [data-output] (:data x))) ;; or (extend-freeze MyType 1 [x data-output] ; Byte id - (.writeUTF [data-output] (:data x)))extend-thaw
macro
(extend-thaw custom-type-id [in] & body)Extends Nippy to support thawing of a custom type with given id: + (.writeUTF [data-output] (:data x)))extend-thaw
macro
(extend-thaw custom-type-id [in] & body)Extends Nippy to support thawing of a custom type with given id: (extend-thaw :foo/my-type [data-input] ; Keyword id - (->MyType (.readUTF data-input))) + (MyType. (.readUTF data-input))) ;; or (extend-thaw 1 [data-input] ; Byte id - (->MyType (.readUTF data-input)))fast-freeze
(fast-freeze x)Like `freeze` but: - Writes data without a Nippy header - Drops all support for compression and encryption - Must be thawed with `fast-thaw` Equivalent to (but a little faster than): - `(freeze x {:compressor nil :encryptor nil :no-header? true})fast-thaw
(fast-thaw ba)Like `thaw` but: + `(freeze x {:compressor nil :encryptor nil :no-header? true})fast-thaw
(fast-thaw ba)Like `thaw` but: - Drops all support for compression and encryption - Supports only data frozen with `fast-freeze` Equivalent to (but a little faster than): - `(thaw x {:compressor nil :encryptor nil :no-header? true})Freezable
protocol
Implementation detail. Be careful about extending to interfaces, + `(thaw x {:compressor nil :encryptor nil :no-header? true})Freezable
protocol
Implementation detail. Be careful about extending to interfaces, Ref. http://goo.gl/6gGRlU.members
-freeze-to-out!
(-freeze-to-out! this out)freezable?
(freezable? x)(freezable? x {:keys [allow-clojure-reader? allow-java-serializable?]})Alpha - subject to change. Returns truthy iff Nippy *appears* to support freezing the given argument. @@ -79,10 +79,10 @@ used to enable the relevant roundtrip fallback test(s). These tests are only **moderately reliable** since they're cached by arg type and don't test for pre/post serialization value equality (there's no good general way of doing so).freeze
(freeze x)(freeze x {:keys [compressor encryptor password], :or {compressor :auto, encryptor aes128-encryptor}, :as opts})Serializes arg (any Clojure data type) to a byte array. To freeze custom -types, extend the Clojure reader or see `extend-freeze`.freeze-to-out!
(freeze-to-out! data-output x)Serializes arg (any Clojure data type) to a DataOutput. Please note that -this is a low-level util: in most cases you'll want `freeze` instead.lz4-compressor
Default net.jpountz.lz4 compressor: +types, extend the Clojure reader or see `extend-freeze`.freeze-to-out!
(freeze-to-out! data-output x)Serializes arg (any Clojure data type) to a DataOutput. Please note that +this is a low-level util: in most cases you'll want `freeze` instead.lz4-compressor
Default net.jpountz.lz4 compressor: Ratio: low. Write speed: very high. Read speed: very high. @@ -97,17 +97,17 @@ Write speed: _very_ slow (also currently single-threaded). Read speed: slow. A specialized compressor for large, low-write data in space-sensitive -environments.map->CacheWrapped
(map->CacheWrapped m__8448__auto__)Factory function for class taoensso.nippy.CacheWrapped, taking a map of keywords to field values. -map->StressRecord
(map->StressRecord m__8448__auto__)Factory function for class taoensso.nippy.StressRecord, taking a map of keywords to field values. -map->CacheWrapped
(map->CacheWrapped m__8454__auto__)Factory function for class taoensso.nippy.CacheWrapped, taking a map of keywords to field values. +map->StressRecord
(map->StressRecord m__8454__auto__)Factory function for class taoensso.nippy.StressRecord, taking a map of keywords to field values. +snappy-compressor
Default org.iq80.snappy.Snappy compressor: Ratio: low. Write speed: very high. Read speed: very high. A good general-purpose compressor.stress-data-benchable
Reference data with stuff removed that breaks reader or other utils we'll -be benching againstthaw
(thaw ba)(thaw ba {:keys [v1-compatibility? compressor encryptor password], :or {compressor :auto, encryptor :auto}, :as opts})Deserializes a frozen Nippy byte array to its original Clojure data type. +stress-data-benchable
Reference data with stuff removed that breaks reader or other utils we'll +be benching againstthaw
(thaw ba)(thaw ba {:keys [v1-compatibility? compressor encryptor password], :or {compressor :auto, encryptor :auto}, :as opts})Deserializes a frozen Nippy byte array to its original Clojure data type. To thaw custom types, extend the Clojure reader or see `extend-thaw`. ** By default, supports data frozen with Nippy v2+ ONLY ** @@ -117,6 +117,6 @@ legacy versions of Nippy. Options include: :v1-compatibility? - support data frozen by legacy versions of Nippy? :compressor - :auto (checks header, default) an ICompressor, or nil - :encryptor - :auto (checks header, default), an IEncryptor, or nilthaw-from-in!
(thaw-from-in! data-input)Deserializes a frozen object from given DataInput to its original Clojure + :encryptor - :auto (checks header, default), an IEncryptor, or nilthaw-from-in!
(thaw-from-in! data-input)Deserializes a frozen object from given DataInput to its original Clojure data type. Please note that this is a low-level util: in most cases you'll -want `thaw` instead.taoensso.nippy.tools documentation Generated by Codox
Nippy 2.12.0-beta1
taoensso.nippy.tools
Utils for 3rd-party tools that want to add user-configurable Nippy support. +taoensso.nippy.tools documentation Generated by Codox
Nippy 2.12.0-RC1
taoensso.nippy.tools
Utils for 3rd-party tools that want to add user-configurable Nippy support. Used by Carmine, Faraday, etc.->WrappedForFreezing
(->WrappedForFreezing value opts)Positional factory function for class taoensso.nippy.tools.WrappedForFreezing.freeze
(freeze x)(freeze x default-opts)Like `nippy/freeze` but merges opts from *freeze-opts*, `wrap-for-freezing`. -map->WrappedForFreezing
(map->WrappedForFreezing m__8448__auto__)Factory function for class taoensso.nippy.tools.WrappedForFreezing, taking a map of keywords to field values. +map->WrappedForFreezing
(map->WrappedForFreezing m__8454__auto__)Factory function for class taoensso.nippy.tools.WrappedForFreezing, taking a map of keywords to field values.thaw
(thaw ba)(thaw ba default-opts)Like `nippy/thaw` but merges opts from `*thaw-opts*`.wrap-for-freezing
(wrap-for-freezing x)(wrap-for-freezing x opts)Ensures that given arg (any freezable data type) is wrapped so that (tools/freeze <wrapped-arg>) will serialize as diff --git a/taoensso.nippy.utils.html b/taoensso.nippy.utils.html index 8884c33..72e8f14 100644 --- a/taoensso.nippy.utils.html +++ b/taoensso.nippy.utils.html @@ -1,10 +1,10 @@ -taoensso.nippy.utils documentation Generated by Codox
Nippy 2.12.0-beta1
\ No newline at end of filetaoensso.nippy.utils
freezable?
(freezable? x)(freezable? x {:keys [allow-clojure-reader? allow-java-serializable?]})Alpha - subject to change. +taoensso.nippy.utils documentation Generated by Codox
Nippy 2.12.0-RC1
\ No newline at end of file +way of doing so).taoensso.nippy.utils
freezable?
(freezable? x)(freezable? x {:keys [allow-clojure-reader? allow-java-serializable?]})Alpha - subject to change. Returns truthy iff Nippy *appears* to support freezing the given argument. `:allow-clojure-reader?` and `:allow-java-serializable?` options may be used to enable the relevant roundtrip fallback test(s). These tests are only **moderately reliable** since they're cached by arg type and don't test for pre/post serialization value equality (there's no good general -way of doing so).