diff --git a/css/default.css b/css/default.css index c6434e9..6cfd894 100644 --- a/css/default.css +++ b/css/default.css @@ -1,19 +1,19 @@ body { - font-family: Helvetica, Arial, sans-serif; - font-size: 15px; + font-family: Helvetica, Arial, sans-serif; + font-size: 15px; } pre, code { - font-family: Monaco, DejaVu Sans Mono, Consolas, monospace; - font-size: 9pt; - margin: 15px 0; + font-family: Monaco, DejaVu Sans Mono, Consolas, monospace; + font-size: 9pt; + margin: 15px 0; } h1 { - font-weight: normal; - font-size: 28px; - margin: 10px 0 2px 0; - padding: 0; + font-weight: normal; + font-size: 29px; + margin: 10px 0 2px 0; + padding: 0; } h2 { @@ -22,60 +22,60 @@ h2 { } .document h1, .namespace-index h1 { - font-size: 30px; + font-size: 32px; margin-top: 12px; } #header, #content, .sidebar { - position: fixed; + position: fixed; } #header { - top: 0; - left: 0; - right: 0; - height: 22px; - color: #f5f5f5; - padding: 5px 7px; + top: 0; + left: 0; + right: 0; + height: 22px; + color: #f5f5f5; + padding: 5px 7px; } #content { - top: 32px; - right: 0; - bottom: 0; - overflow: auto; - background: #fff; - color: #333; - padding: 0 18px; + top: 32px; + right: 0; + bottom: 0; + overflow: auto; + background: #fff; + color: #333; + padding: 0 18px; } .sidebar { - position: fixed; - top: 32px; - bottom: 0; - overflow: auto; + position: fixed; + top: 32px; + bottom: 0; + overflow: auto; } .sidebar.primary { - background: #e2e2e2; - border-right: solid 1px #cccccc; - left: 0; - width: 250px; + background: #e2e2e2; + border-right: solid 1px #cccccc; + left: 0; + width: 250px; } .sidebar.secondary { - background: #f2f2f2; - border-right: solid 1px #d7d7d7; - left: 251px; - width: 200px; + background: #f2f2f2; + border-right: solid 1px #d7d7d7; + left: 251px; + width: 200px; } #content.namespace-index, #content.document { - left: 251px; + left: 251px; } #content.namespace-docs { - left: 452px; + left: 452px; } #content.document { @@ -89,11 +89,11 @@ h2 { } #header h1 { - margin: 0; - padding: 0; - font-size: 18px; - font-weight: lighter; - text-shadow: -1px -1px 0px #333; + margin: 0; + padding: 0; + font-size: 18px; + font-weight: lighter; + text-shadow: -1px -1px 0px #333; } #header h1 .project-version { @@ -105,16 +105,16 @@ h2 { } #header a, .sidebar a { - display: block; - text-decoration: none; + display: block; + text-decoration: none; } #header a { - color: #f5f5f5; + color: #f5f5f5; } .sidebar a { - color: #333; + color: #333; } #header h2 { @@ -131,20 +131,23 @@ h2 { } .sidebar h3 { - margin: 0; - padding: 10px 10px 0 10px; - font-size: 19px; - font-weight: normal; + margin: 0; + padding: 10px 13px 0 13px; + font-size: 19px; + font-weight: lighter; +} + +.sidebar h3 a { + color: #444; } .sidebar h3.no-link { color: #636363; - font-weight: lighter; } .sidebar ul { - padding: 7px 0 6px 0; - margin: 0; + padding: 7px 0 6px 0; + margin: 0; } .sidebar ul.index-link { @@ -152,13 +155,13 @@ h2 { } .sidebar li { - display: block; - vertical-align: middle; + display: block; + vertical-align: middle; } .sidebar li a, .sidebar li .no-link { border-left: 3px solid transparent; - padding: 0 7px; + padding: 0 10px; white-space: nowrap; } @@ -220,13 +223,13 @@ h2 { } .sidebar.primary li.current a { - border-left: 3px solid #a33; - color: #a33; + border-left: 3px solid #a33; + color: #a33; } .sidebar.secondary li.current a { - border-left: 3px solid #33a; - color: #33a; + border-left: 3px solid #33a; + color: #33a; } .namespace-index h2 { @@ -249,8 +252,8 @@ h2 { } .namespace-docs h3 { - font-size: 18px; - font-weight: bold; + font-size: 18px; + font-weight: bold; } .public h3 { @@ -270,7 +273,7 @@ h2 { } .public:last-child { - margin-bottom: 20%; + margin-bottom: 20%; } .members .public:last-child { @@ -384,6 +387,16 @@ h4.deprecated { padding-left: 0; } +.type-sig { + clear: both; + color: #088; +} + +.type-sig pre { + padding-top: 10px; + margin: 0; +} + .usage code { display: block; color: #008; @@ -506,7 +519,7 @@ pre.deps { .doc abbr { border-bottom: 1px dotted #333; - font-variant: none + font-variant: none; cursor: help; } diff --git a/index.html b/index.html index 0316b39..81c15cf 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,5 @@ - -Nippy 2.11.0-RC1

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

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).

taoensso.nippy.encryption

Simple no-nonsense crypto with reasonable defaults.

taoensso.nippy.tools

Utilities for third-party tools that want to add fully-user-configurable
 Nippy support. Used by Carmine and Faraday.

taoensso.nippy.utils

Public variables and functions:

\ 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 @@ - -taoensso.nippy.benchmarks documentation

taoensso.nippy.benchmarks

bench

(bench {:keys [reader? lzma2? fressian? laps], :or {laps 1}})

bench*

macro

(bench* & body)

bench1

(bench1 freezer thawer & [sizer])

fressian-freeze

(fressian-freeze value)

fressian-thaw

(fressian-thaw value)
\ No newline at end of file + +taoensso.nippy.benchmarks documentation

taoensso.nippy.benchmarks

bench

(bench {:keys [reader? lzma2? fressian? laps], :or {laps 1}})

bench*

macro

(bench* & body)

bench1

(bench1 freezer thawer & [sizer])

fressian-freeze

(fressian-freeze value)

fressian-thaw

(fressian-thaw value)
\ 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.compression documentation

taoensso.nippy.compression

->LZ4Compressor

(->LZ4Compressor compressor decompressor)
Positional factory function for class taoensso.nippy.compression.LZ4Compressor.
+
+taoensso.nippy.compression documentation

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:
@@ -22,5 +23,5 @@ environments.

standard-header-ids

These'll support :auto thaw.
+A good general-purpose compressor.

standard-header-ids

These'll support :auto thaw.
 
\ 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.encryption documentation

taoensso.nippy.encryption

Simple no-nonsense crypto with reasonable defaults.
+
+taoensso.nippy.encryption documentation

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.
+

standard-header-ids

These'll support :auto thaw
 
\ 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 documentation

taoensso.nippy

High-performance serialization library for Clojure.
+
+taoensso.nippy documentation

taoensso.nippy

High-performance serialization library for Clojure.
 Originally adapted from Deep-Freeze (Ref. https://goo.gl/OePPGr).

*custom-readers*

dynamic

{<hash-or-byte-id> (fn [data-input])}
 

*default-freeze-compressor-selector*

dynamic

(fn selector [^bytes ba])->compressor used by `(freeze <x> {:compressor :auto}).
 

*final-freeze-fallback*

dynamic

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

byte-sized?

(byte-sized? n)

compress

(compress compressor ba)

decompress

(decompress compressor ba)

decrypt

(decrypt encryptor pwd ba)

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.

encrypt

(encrypt encryptor pwd ba)

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-fallback-as-str

(freeze-fallback-as-str out x)

freeze-to-out!

(freeze-to-out! data-output x)
Serializes arg (any Clojure data type) to a DataOutput
 

id-bigdec

id-bigint

id-biginteger

id-boolean

id-byte-as-long

id-bytes

id-double

id-float

id-int-as-long

id-integer

id-keyword

id-keyword-depr1

id-map-depr1

id-map-depr2

id-prefixed-custom

id-queue

id-ratio

id-reader

id-reader-depr1

id-record

id-reserved

id-serializable

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

inspect-ba

(inspect-ba ba)(inspect-ba ba thaw-opts)
Alpha - subject to change
 

lz4-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.
 

read-biginteger

(read-biginteger in)

read-bytes

(read-bytes in)

read-coll

(read-coll in to-coll)

read-kvs

(read-kvs in to-coll)

read-kvs-depr1

(read-kvs-depr1 in to-coll)

read-sm-bytes

(read-sm-bytes in)

read-sm-coll

(read-sm-coll in to-coll)

read-sm-kvs

(read-sm-kvs in to-coll)

read-sm-utf8

(read-sm-utf8 in)

read-utf8

(read-utf8 in)

set-default-freeze-compressor-selector!

(set-default-freeze-compressor-selector! selector)
Sets root binding of `*default-freeze-compressor-selector*`
 

short-sized?

(short-sized? n)

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

Reference data used for tests & benchmarks
-

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 against

stress-data-comparable

Reference data with stuff removed that breaks roundtrip equality
 

swap-custom-readers!

(swap-custom-readers! f)

thaw

(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

taoensso.nippy.tools

Utilities for third-party tools that want to add fully-user-configurable
+
+taoensso.nippy.tools documentation

taoensso.nippy.tools

Utilities for third-party tools that want to add fully-user-configurable
 Nippy support. Used by Carmine and Faraday.

*thaw-opts*

dynamic

->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

taoensso.nippy.utils

freezable?

(freezable? x & [{:keys [allow-clojure-reader? allow-java-serializable?]}])
Alpha - subject to change, MAY BE BUGGY!
+
+taoensso.nippy.utils documentation

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).

readable?

serializable?

\ 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).

readable?

serializable?

\ No newline at end of file