Housekeeping
This commit is contained in:
parent
652b0b05cd
commit
93ef118e80
6 changed files with 6 additions and 9 deletions
|
|
@ -11,7 +11,7 @@
|
|||
:1.6 {:dependencies [[org.clojure/clojure "1.6.0-master-SNAPSHOT"]]}
|
||||
:dev {:dependencies []}
|
||||
:test {:dependencies [[org.xerial.snappy/snappy-java "1.0.5-M3"]]}
|
||||
:bench {:dependencies [] :jvm-opts ["-server"]}}
|
||||
:bench {:dependencies [] :jvm-opts ^:replace ["-server"]}}
|
||||
:aliases {"test-all" ["with-profile" "test,1.4:test,1.5:test,1.6" "expectations"]
|
||||
"test-auto" ["with-profile" "test" "autoexpect"]
|
||||
"start-dev" ["with-profile" "dev,test,bench" "repl" ":headless"]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@
|
|||
(encryption :as encryption :refer (aes128-encryptor))])
|
||||
(:import [java.io DataInputStream DataOutputStream ByteArrayOutputStream
|
||||
ByteArrayInputStream]
|
||||
;; [java.io DataInputStream DataOutputStream]
|
||||
;;[cc.qbits.grease.io FastByteArrayInputStream
|
||||
;;FastByteArrayOutputStream]
|
||||
[clojure.lang Keyword BigInt Ratio PersistentQueue PersistentTreeMap
|
||||
PersistentTreeSet IPersistentList IPersistentVector IPersistentMap
|
||||
IPersistentSet IPersistentCollection]))
|
||||
|
|
|
|||
|
|
@ -17,4 +17,4 @@
|
|||
(decompress [_ ba] (org.iq80.snappy.Snappy/uncompress ba 0 (alength ^bytes ba))))
|
||||
|
||||
(def snappy-compressor "Default org.iq80.snappy.Snappy compressor."
|
||||
(SnappyCompressor.))
|
||||
(->SnappyCompressor))
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
|
||||
Faster than `aes128-salted`, and harder to attack any particular key - but
|
||||
increased danger if a key is somehow compromised."
|
||||
(AES128Encryptor. (atom {})))
|
||||
(->AES128Encryptor (atom {})))
|
||||
|
||||
;;;; Default implementation
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
(defn wrap-for-freezing
|
||||
"Wraps arg (any freezable data type) so that (tools/freeze <wrapped-arg>)
|
||||
will serialize the arg using given options."
|
||||
[value & [opts]] (WrappedForFreezing. value opts))
|
||||
[value & [opts]] (->WrappedForFreezing value opts))
|
||||
|
||||
(defn freeze
|
||||
"Like `nippy/freeze` but takes options from special argument wrapper when
|
||||
|
|
|
|||
|
|
@ -87,9 +87,9 @@
|
|||
(defn ba-split [^bytes ba ^Integer idx]
|
||||
(let [s (alength ba)]
|
||||
(when (> s idx)
|
||||
[(java.util.Arrays/copyOfRange ba 0 idx)
|
||||
[(java.util.Arrays/copyOf ba idx)
|
||||
(java.util.Arrays/copyOfRange ba idx s)])))
|
||||
|
||||
(comment (String. (ba-concat (.getBytes "foo") (.getBytes "bar")))
|
||||
(let [[x y] (ba-split (.getBytes "foobar") 5)]
|
||||
[(String. x) (String. y)]))
|
||||
[(String. x) (String. y)]))
|
||||
Loading…
Reference in a new issue