Nippy 2.11.0-RC1
High-performance serialization library for Clojure
Installation
To install, add the following dependency to your project file:
[com.taoensso/nippy "2.11.0-RC1"]
Namespaces
taoensso.nippy
High-performance serialization library for Clojure. + +Nippy 2.11.0 Generated by Codox
Nippy 2.11.0
\ No newline at end of file diff --git a/js/page_effects.js b/js/page_effects.js index 28bdfc8..fdacbf8 100644 --- a/js/page_effects.js +++ b/js/page_effects.js @@ -71,18 +71,26 @@ function sidebarContentWidth(element) { return Math.max.apply(Math, widths) } +function calculateSize(width, snap, margin, minimum) { + if (width == 0) { + return 0 + } + else { + return Math.max(minimum, (Math.ceil(width / snap) * snap) + (margin * 2)) + } +} + function resizeSidebars() { - var primaryWidth = sidebarContentWidth('.primary') + 30 + var primaryWidth = sidebarContentWidth('.primary') var secondaryWidth = 0 if ($('.secondary').length != 0) { - secondaryWidth = sidebarContentWidth('.secondary') + 30 + secondaryWidth = sidebarContentWidth('.secondary') } // snap to grid - var snap = 30 - primaryWidth = Math.ceil(primaryWidth / snap) * snap - secondaryWidth = Math.ceil(secondaryWidth / snap) * snap + primaryWidth = calculateSize(primaryWidth, 32, 13, 160) + secondaryWidth = calculateSize(secondaryWidth, 32, 13, 160) $('.primary').css('width', primaryWidth) $('.secondary').css('width', secondaryWidth).css('left', primaryWidth + 1) diff --git a/taoensso.nippy.benchmarks.html b/taoensso.nippy.benchmarks.html index 9949b7f..3f09dbe 100644 --- a/taoensso.nippy.benchmarks.html +++ b/taoensso.nippy.benchmarks.html @@ -1,2 +1,3 @@ - -Nippy 2.11.0
High-performance serialization library for Clojure.
Installation
To install, add the following dependency to your project or build file:
[com.taoensso/nippy "2.11.0"]Namespaces
taoensso.nippy
High-performance serialization library for Clojure. Originally adapted from Deep-Freeze (Ref. https://goo.gl/OePPGr).Public variables and functions:
- *custom-readers*
- *default-freeze-compressor-selector*
- *final-freeze-fallback*
- ->Compressable-LZMA2
- ->StressRecord
- aes128-encryptor
- byte-sized?
- compress
- decompress
- decrypt
- default-freeze-compressor-selector
- encrypt
- extend-freeze
- extend-thaw
- Freezable
- freezable?
- freeze
- freeze-fallback-as-str
- freeze-to-out!
- id-bigdec
- id-bigint
- id-biginteger
- id-boolean
- id-byte
- id-byte-as-long
- id-bytes
- id-char
- id-date
- id-double
- id-float
- id-int-as-long
- id-integer
- id-keyword
- id-keyword-depr1
- id-list
- id-long
- id-map
- id-map-depr1
- id-map-depr2
- id-meta
- id-nil
- id-prefixed-custom
- id-queue
- id-ratio
- id-reader
- id-reader-depr1
- id-record
- id-reserved
- id-seq
- id-serializable
- id-set
- id-short
- id-short-as-long
- id-sm-bytes
- id-sm-keyword
- id-sm-map
- id-sm-set
- id-sm-string
- id-sm-vec
- id-sorted-map
- id-sorted-map-depr1
- id-sorted-set
- id-string
- id-string-depr1
- id-uuid
- id-vec
- inspect-ba
- lz4-compressor
- lz4hc-compressor
- lzma2-compressor
- map->Compressable-LZMA2
- map->StressRecord
- read-biginteger
- read-bytes
- read-coll
- read-kvs
- read-kvs-depr1
- read-sm-bytes
- read-sm-coll
- read-sm-kvs
- read-sm-utf8
- read-utf8
- set-default-freeze-compressor-selector!
- short-sized?
- snappy-compressor
- stress-data
- stress-data-benchable
- stress-data-comparable
- swap-custom-readers!
- thaw
- thaw-from-in!
- when-debug
- write-biginteger
- write-bytes
- write-id
- write-ided-bytes
- write-ided-coll
- write-ided-keyword
- write-ided-kvs
- write-ided-long
- write-ided-map
- write-ided-set
- write-ided-string
- write-ided-vec
- write-sm-bytes
- write-sm-utf8
- write-utf8
taoensso.nippy.encryption
Simple no-nonsense crypto with reasonable defaults.Public variables and functions:
taoensso.nippy.tools
Utilities for third-party tools that want to add fully-user-configurable Nippy support. Used by Carmine and Faraday.Public variables and functions:
taoensso.nippy.benchmarks documentation Generated by Codox
Nippy 2.11.0-RC1
\ No newline at end of file + +taoensso.nippy.benchmarks
taoensso.nippy.benchmarks documentation Generated by Codox
Nippy 2.11.0
\ No newline at end of file diff --git a/taoensso.nippy.compression.html b/taoensso.nippy.compression.html index 8938cca..9a21920 100644 --- a/taoensso.nippy.compression.html +++ b/taoensso.nippy.compression.html @@ -1,5 +1,6 @@ - -taoensso.nippy.benchmarks
taoensso.nippy.compression documentation Generated by Codox
Nippy 2.11.0-RC1
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.11.0
\ No newline at end of file diff --git a/taoensso.nippy.encryption.html b/taoensso.nippy.encryption.html index 5aa2510..cbf1ad8 100644 --- a/taoensso.nippy.encryption.html +++ b/taoensso.nippy.encryption.html @@ -1,9 +1,10 @@ - -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)taoensso.nippy.encryption documentation Generated by Codox
Nippy 2.11.0-RC1
taoensso.nippy.encryption
Simple no-nonsense crypto with reasonable defaults. + +taoensso.nippy.encryption documentation Generated by Codox
Nippy 2.11.0
\ No newline at end of file diff --git a/taoensso.nippy.html b/taoensso.nippy.html index f91b08c..9e31f5f 100644 --- a/taoensso.nippy.html +++ b/taoensso.nippy.html @@ -1,12 +1,13 @@ - -taoensso.nippy.encryption
Simple no-nonsense crypto with reasonable defaults.->AES128Encryptor
(->AES128Encryptor key-gen key-cache)Positional factory function for class taoensso.nippy.encryption.AES128Encryptor.aes128-encryptor
Default 128bit AES encryptor with many-round SHA-512 key-gen. -Password form [:salted "my-password"] +Password form [:salted "my-password"] --------------------------------------- USE CASE: You want more than a small, finite number of passwords (e.g. each item encrypted will use a unique user-provided password). @@ -12,17 +13,17 @@ IMPLEMENTATION: Uses a relatively cheap key hash, but automatically salts every key. PROS: Each key is independent so would need to be attacked independently. -CONS: Key caching impossible, so there's an inherent trade-off between +CONS: Key caching impossible, so there's an inherent trade-off between encryption/decryption speed and the difficulty of attacking any particular key. Slower than `aes128-cached`, and easier to attack any particular key - but keys are independent. -Password form [:cached "my-password"] +Password form [:cached "my-password"] --------------------------------------- USE CASE: You want only a small, finite number of passwords (e.g. a limited - number of staff/admins, or you'll be using a single password to + number of staff/admins, or you'll be using a single password to encrypt many items). IMPLEMENTATION: Uses a _very_ expensive (but cached) key hash, and no salt. @@ -34,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__6518__auto__)Factory function for class taoensso.nippy.encryption.AES128Encryptor, taking a map of keywords to field values. -standard-header-ids
These'll support :auto thaw +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__6522__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.11.0-RC1
taoensso.nippy
High-performance serialization library for Clojure. + +taoensso.nippy documentation Generated by Codox
Nippy 2.11.0
taoensso.nippy
High-performance serialization library for Clojure. Originally adapted from Deep-Freeze (Ref. https://goo.gl/OePPGr).*default-freeze-compressor-selector*
dynamic
(fn selector [^bytes ba])->compressor used by `(freeze <x> {:compressor :auto}).->Compressable-LZMA2
(->Compressable-LZMA2 value)Positional factory function for class taoensso.nippy.Compressable-LZMA2.->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"] +Password form [:salted "my-password"] --------------------------------------- USE CASE: You want more than a small, finite number of passwords (e.g. each item encrypted will use a unique user-provided password). @@ -15,17 +16,17 @@ IMPLEMENTATION: Uses a relatively cheap key hash, but automatically salts every key. PROS: Each key is independent so would need to be attacked independently. -CONS: Key caching impossible, so there's an inherent trade-off between +CONS: Key caching impossible, so there's an inherent trade-off between encryption/decryption speed and the difficulty of attacking any particular key. Slower than `aes128-cached`, and easier to attack any particular key - but keys are independent. -Password form [:cached "my-password"] +Password form [:cached "my-password"] --------------------------------------- USE CASE: You want only a small, finite number of passwords (e.g. a limited - number of staff/admins, or you'll be using a single password to + number of staff/admins, or you'll be using a single password to encrypt many items). IMPLEMENTATION: Uses a _very_ expensive (but cached) key hash, and no salt. @@ -39,7 +40,7 @@ CONS: Using a small number of keys for many encrypted items means that if any Faster than `aes128-salted`, and harder to attack any particular key - but increased danger if a key is somehow compromised.default-freeze-compressor-selector
(default-freeze-compressor-selector ba)Strategy: * Prioritize speed, but allow lz4. -* Skip lz4 unless it's likely that lz4's space benefit will outweigh its +* Skip lz4 unless it's likely that lz4's space benefit will outweigh its space overhead.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 @@ -62,8 +63,8 @@ Conservative with default options. `:allow-clojure-reader?` and `:allow-java-serializable?` options may be used to also 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 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 +**moderately reliable** since they're cached by arg type and don't test for +pre/post serialization 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 DataOutputlz4-compressor
Default net.jpountz.lz4 compressor: @@ -81,8 +82,8 @@ Write speed: _very_ slow (also currently single-threaded). Read speed: slow. A specialized compressor for large, low-write data in space-sensitive -environments.map->Compressable-LZMA2
(map->Compressable-LZMA2 m__6518__auto__)Factory function for class taoensso.nippy.Compressable-LZMA2, taking a map of keywords to field values. -map->StressRecord
(map->StressRecord m__6518__auto__)Factory function for class taoensso.nippy.StressRecord, taking a map of keywords to field values. +environments.map->Compressable-LZMA2
(map->Compressable-LZMA2 m__6522__auto__)Factory function for class taoensso.nippy.Compressable-LZMA2, taking a map of keywords to field values. +map->StressRecord
(map->StressRecord m__6522__auto__)Factory function for class taoensso.nippy.StressRecord, taking a map of keywords to field values.set-default-freeze-compressor-selector!
(set-default-freeze-compressor-selector! selector)Sets root binding of `*default-freeze-compressor-selector*`snappy-compressor
Default org.iq80.snappy.Snappy compressor: Ratio: low. @@ -90,7 +91,7 @@ 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 +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 object from given byte array to its original Clojure data type. To thaw custom types, extend the Clojure reader or see `extend-thaw`. diff --git a/taoensso.nippy.tools.html b/taoensso.nippy.tools.html index 7ece738..83e6e53 100644 --- a/taoensso.nippy.tools.html +++ b/taoensso.nippy.tools.html @@ -1,8 +1,9 @@ - -taoensso.nippy.tools documentation Generated by Codox
Nippy 2.11.0-RC1
taoensso.nippy.tools
Utilities for third-party tools that want to add fully-user-configurable + +taoensso.nippy.tools documentation Generated by Codox
Nippy 2.11.0
taoensso.nippy.tools
Utilities for third-party tools that want to add fully-user-configurable Nippy support. Used by Carmine and Faraday.->WrappedForFreezing
(->WrappedForFreezing value opts)Positional factory function for class taoensso.nippy.tools.WrappedForFreezing.freeze
(freeze x & [{:keys [default-opts]}])Like `nippy/freeze` but takes options from special argument wrapper when -present.map->WrappedForFreezing
(map->WrappedForFreezing m__6518__auto__)Factory function for class taoensso.nippy.tools.WrappedForFreezing, taking a map of keywords to field values. +present.map->WrappedForFreezing
(map->WrappedForFreezing m__6522__auto__)Factory function for class taoensso.nippy.tools.WrappedForFreezing, taking a map of keywords to field values.thaw
(thaw ba & [{:keys [default-opts]}])Like `nippy/thaw` but takes options from *thaw-opts* binding.with-thaw-opts
macro
(with-thaw-opts opts & body)Evaluates body using given options for any automatic deserialization in context.wrap-for-freezing
(wrap-for-freezing value & [opts])Wraps arg (any freezable data type) so that (tools/freeze <wrapped-arg>) diff --git a/taoensso.nippy.utils.html b/taoensso.nippy.utils.html index f0d3ed7..1c55536 100644 --- a/taoensso.nippy.utils.html +++ b/taoensso.nippy.utils.html @@ -1,9 +1,10 @@ - -taoensso.nippy.utils documentation Generated by Codox
Nippy 2.11.0-RC1
\ No newline at end of filetaoensso.nippy.utils
freezable?
(freezable? x & [{:keys [allow-clojure-reader? allow-java-serializable?]}])Alpha - subject to change, MAY BE BUGGY! + +taoensso.nippy.utils documentation Generated by Codox
Nippy 2.11.0
\ No newline at end of file +**moderately reliable** since they're cached by arg type and don't test for +pre/post serialization equality (there's no good general way of doing so).taoensso.nippy.utils
freezable?
(freezable? x & [{:keys [allow-clojure-reader? allow-java-serializable?]}])Alpha - subject to change, MAY BE BUGGY! Returns truthy value iff Nippy supports de/serialization of given argument. Conservative with default options. `:allow-clojure-reader?` and `:allow-java-serializable?` options may be used to also 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 equality (there's no good general way of doing so).