Plugable LZ4 compression for Nippy.
It's quite straightforward, add nippy-lz4 to your dependencies,
then import qbits.nippy-lz4
namespace and pass the compressor you want
to use to nippy.
The available compressors are
qbits.nippy-lz4/lz4-compressor
: the fastest default compressorqbits.nippy-lz4/lz4hc-compressor
: the high compression compressor
Ex:
(use 'taoensso.nippy)
(require '[qbits.nippy-lz4 :refer [lz4-compressor lz4hc-compressor]])
(def compressed-data (freeze {:foo :bar} {:compressor lz4hc-compressor}))
(prn (thaw compressed-data {:compressor lz4hc-compressor}))
>> {:foo :bar}
nippy-lz4 is available on Clojars.
Add this to your dependencies:
[cc.qbits/nippy-lz4 "0.1.0"]
Please check the Changelog if you are upgrading.
Copyright © 2013 Max Penet
Distributed under the Eclipse Public License, the same as Clojure.