Merge branch 'dev': v0.9.1.
This commit is contained in:
commit
ff93b73983
3 changed files with 25 additions and 11 deletions
14
README.md
14
README.md
|
|
@ -1,7 +1,7 @@
|
||||||
Current [semantic](http://semver.org/) version:
|
Current [semantic](http://semver.org/) version:
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
[com.taoensso/nippy "0.9.0"]
|
[com.taoensso/nippy "0.9.1"]
|
||||||
```
|
```
|
||||||
|
|
||||||
# Nippy, a serialization library for Clojure
|
# Nippy, a serialization library for Clojure
|
||||||
|
|
@ -13,7 +13,7 @@ Nippy is an attempt to provide a drop-in, high-performance alternative to the re
|
||||||
## What's In The Box?
|
## What's In The Box?
|
||||||
* Simple, **high-performance** all-Clojure de/serializer.
|
* Simple, **high-performance** all-Clojure de/serializer.
|
||||||
* Comprehesive, extensible **support for all major data types**.
|
* Comprehesive, extensible **support for all major data types**.
|
||||||
* **Reader-fallback** for difficult/future types.
|
* **Reader-fallback** for difficult/future types (including Clojure 1.4+ tagged literals).
|
||||||
* **Full test coverage** for every supported type.
|
* **Full test coverage** for every supported type.
|
||||||
* [Snappy](http://code.google.com/p/snappy/) **integrated de/compression** for efficient storage and network transfer.
|
* [Snappy](http://code.google.com/p/snappy/) **integrated de/compression** for efficient storage and network transfer.
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ Nippy uses [Snappy](http://code.google.com/p/snappy-java/) which currently has a
|
||||||
Depend on Nippy in your `project.clj`:
|
Depend on Nippy in your `project.clj`:
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
[com.taoensso/nippy "0.9.0"]
|
[com.taoensso/nippy "0.9.1"]
|
||||||
```
|
```
|
||||||
|
|
||||||
and `require` the library:
|
and `require` the library:
|
||||||
|
|
@ -60,6 +60,7 @@ nippy/stress-data
|
||||||
:string-utf8 "ಬಾ ಇಲ್ಲಿ ಸಂಭವಿಸ"
|
:string-utf8 "ಬಾ ಇಲ್ಲಿ ಸಂಭವಿಸ"
|
||||||
:string-long (apply str (range 1000))
|
:string-long (apply str (range 1000))
|
||||||
:keyword :keyword
|
:keyword :keyword
|
||||||
|
:ns-keyword ::keyword
|
||||||
|
|
||||||
:list (list 1 2 3 4 5 (list 6 7 8 (list 9 10)))
|
:list (list 1 2 3 4 5 (list 6 7 8 (list 9 10)))
|
||||||
:list-quoted '(1 2 3 4 5 (6 7 8 (9 10)))
|
:list-quoted '(1 2 3 4 5 (6 7 8 (9 10)))
|
||||||
|
|
@ -85,7 +86,12 @@ nippy/stress-data
|
||||||
:double (double 3.14)
|
:double (double 3.14)
|
||||||
:bigdec (bigdec 3.1415926535897932384626433832795)
|
:bigdec (bigdec 3.1415926535897932384626433832795)
|
||||||
|
|
||||||
:ratio 22/7}
|
:ratio 22/7
|
||||||
|
|
||||||
|
;; Clojure 1.4+
|
||||||
|
;; :tagged-uuid (java.util.UUID/randomUUID)
|
||||||
|
;; :tagged-date (java.util.Date.)
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Serialize it:
|
Serialize it:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
(defproject com.taoensso/nippy "0.9.0"
|
(defproject com.taoensso/nippy "0.9.1"
|
||||||
:description "Simple, high-performance Clojure serialization library."
|
:description "Simple, high-performance Clojure serialization library."
|
||||||
:url "https://github.com/ptaoussanis/nippy"
|
:url "https://github.com/ptaoussanis/nippy"
|
||||||
:license {:name "Eclipse Public License"}
|
:license {:name "Eclipse Public License"}
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
~@body)))
|
~@body)))
|
||||||
|
|
||||||
(defmacro coll-freezer
|
(defmacro coll-freezer
|
||||||
"Helper to freeze simple collection types."
|
"Helper to extend Freezable protocol to simple collection types."
|
||||||
[type id & body]
|
[type id & body]
|
||||||
`(freezer
|
`(freezer
|
||||||
~type ~id
|
~type ~id
|
||||||
|
|
@ -100,7 +100,9 @@
|
||||||
|
|
||||||
(freezer Character id-char (.writeChar s (int x)))
|
(freezer Character id-char (.writeChar s (int x)))
|
||||||
(freezer String id-string (.writeUTF s x))
|
(freezer String id-string (.writeUTF s x))
|
||||||
(freezer Keyword id-keyword (.writeUTF s (name x)))
|
(freezer Keyword id-keyword (.writeUTF s (if-let [ns (namespace x)]
|
||||||
|
(str ns "/" (name x))
|
||||||
|
(name x))))
|
||||||
|
|
||||||
(declare freeze-to-stream!*)
|
(declare freeze-to-stream!*)
|
||||||
|
|
||||||
|
|
@ -252,6 +254,7 @@
|
||||||
:string-utf8 "ಬಾ ಇಲ್ಲಿ ಸಂಭವಿಸ"
|
:string-utf8 "ಬಾ ಇಲ್ಲಿ ಸಂಭವಿಸ"
|
||||||
:string-long (apply str (range 1000))
|
:string-long (apply str (range 1000))
|
||||||
:keyword :keyword
|
:keyword :keyword
|
||||||
|
:ns-keyword ::keyword
|
||||||
|
|
||||||
:list (list 1 2 3 4 5 (list 6 7 8 (list 9 10)))
|
:list (list 1 2 3 4 5 (list 6 7 8 (list 9 10)))
|
||||||
:list-quoted '(1 2 3 4 5 (6 7 8 (9 10)))
|
:list-quoted '(1 2 3 4 5 (6 7 8 (9 10)))
|
||||||
|
|
@ -280,4 +283,9 @@
|
||||||
:double (double 3.14)
|
:double (double 3.14)
|
||||||
:bigdec (bigdec 3.1415926535897932384626433832795)
|
:bigdec (bigdec 3.1415926535897932384626433832795)
|
||||||
|
|
||||||
:ratio 22/7})
|
:ratio 22/7
|
||||||
|
|
||||||
|
;; Clojure 1.4+
|
||||||
|
;; :tagged-uuid (java.util.UUID/randomUUID)
|
||||||
|
;; :tagged-date (java.util.Date.)
|
||||||
|
})
|
||||||
Loading…
Reference in a new issue