Housekeeping

This commit is contained in:
Peter Taoussanis 2013-07-01 18:31:41 +07:00
parent 652b0b05cd
commit 93ef118e80
6 changed files with 6 additions and 9 deletions

View file

@ -11,7 +11,7 @@
:1.6 {:dependencies [[org.clojure/clojure "1.6.0-master-SNAPSHOT"]]} :1.6 {:dependencies [[org.clojure/clojure "1.6.0-master-SNAPSHOT"]]}
:dev {:dependencies []} :dev {:dependencies []}
:test {:dependencies [[org.xerial.snappy/snappy-java "1.0.5-M3"]]} :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"] :aliases {"test-all" ["with-profile" "test,1.4:test,1.5:test,1.6" "expectations"]
"test-auto" ["with-profile" "test" "autoexpect"] "test-auto" ["with-profile" "test" "autoexpect"]
"start-dev" ["with-profile" "dev,test,bench" "repl" ":headless"] "start-dev" ["with-profile" "dev,test,bench" "repl" ":headless"]

View file

@ -8,9 +8,6 @@
(encryption :as encryption :refer (aes128-encryptor))]) (encryption :as encryption :refer (aes128-encryptor))])
(:import [java.io DataInputStream DataOutputStream ByteArrayOutputStream (:import [java.io DataInputStream DataOutputStream ByteArrayOutputStream
ByteArrayInputStream] ByteArrayInputStream]
;; [java.io DataInputStream DataOutputStream]
;;[cc.qbits.grease.io FastByteArrayInputStream
;;FastByteArrayOutputStream]
[clojure.lang Keyword BigInt Ratio PersistentQueue PersistentTreeMap [clojure.lang Keyword BigInt Ratio PersistentQueue PersistentTreeMap
PersistentTreeSet IPersistentList IPersistentVector IPersistentMap PersistentTreeSet IPersistentList IPersistentVector IPersistentMap
IPersistentSet IPersistentCollection])) IPersistentSet IPersistentCollection]))

View file

@ -17,4 +17,4 @@
(decompress [_ ba] (org.iq80.snappy.Snappy/uncompress ba 0 (alength ^bytes ba)))) (decompress [_ ba] (org.iq80.snappy.Snappy/uncompress ba 0 (alength ^bytes ba))))
(def snappy-compressor "Default org.iq80.snappy.Snappy compressor." (def snappy-compressor "Default org.iq80.snappy.Snappy compressor."
(SnappyCompressor.)) (->SnappyCompressor))

View file

@ -129,7 +129,7 @@
Faster than `aes128-salted`, and harder to attack any particular key - but Faster than `aes128-salted`, and harder to attack any particular key - but
increased danger if a key is somehow compromised." increased danger if a key is somehow compromised."
(AES128Encryptor. (atom {}))) (->AES128Encryptor (atom {})))
;;;; Default implementation ;;;; Default implementation

View file

@ -11,7 +11,7 @@
(defn wrap-for-freezing (defn wrap-for-freezing
"Wraps arg (any freezable data type) so that (tools/freeze <wrapped-arg>) "Wraps arg (any freezable data type) so that (tools/freeze <wrapped-arg>)
will serialize the arg using given options." will serialize the arg using given options."
[value & [opts]] (WrappedForFreezing. value opts)) [value & [opts]] (->WrappedForFreezing value opts))
(defn freeze (defn freeze
"Like `nippy/freeze` but takes options from special argument wrapper when "Like `nippy/freeze` but takes options from special argument wrapper when

View file

@ -87,7 +87,7 @@
(defn ba-split [^bytes ba ^Integer idx] (defn ba-split [^bytes ba ^Integer idx]
(let [s (alength ba)] (let [s (alength ba)]
(when (> s idx) (when (> s idx)
[(java.util.Arrays/copyOfRange ba 0 idx) [(java.util.Arrays/copyOf ba idx)
(java.util.Arrays/copyOfRange ba idx s)]))) (java.util.Arrays/copyOfRange ba idx s)])))
(comment (String. (ba-concat (.getBytes "foo") (.getBytes "bar"))) (comment (String. (ba-concat (.getBytes "foo") (.getBytes "bar")))