File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- (defproject net.tbt-post /zlib-tiny " 0.1 .0"
1+ (defproject net.tbt-post /zlib-tiny " 0.2 .0"
22 :description " Tiny Clojure ZLib helper"
33 :url " https://github.com/source-c/zlib-tiny"
44 :license {:name " Eclipse Public License"
Original file line number Diff line number Diff line change 1818 [^String s & [^String encoding]]
1919 (.getBytes s (or encoding " UTF-8" )))
2020
21- (defn bytes->string
21+ (defn bytes->str
2222 " Returns the String corresponding to the given encoding's decoding of the
2323 given bytes. If no encoding is specified, UTF-8 is used."
24- [^" [B " b & [^String encoding]]
24+ [^bytes b & [^String encoding]]
2525 (String. b (or encoding " UTF-8" )))
2626
2727(defn gunzip
7878 (IOUtils/toByteArray (DeflaterInputStream. (ByteArrayInputStream. b)))))
7979
8080(comment " ZLib Example"
81- (bytes->string (force-byte-array (inflate (deflate (.getBytes " test it!" ))))))
81+ (bytes->str (force-byte-array (inflate (deflate (str->bytes " test it!" ))))))
8282(comment " GZip Example"
83- (bytes->string (gunzip (gzip (.getBytes " test it!" )))))
83+ (bytes->str (gunzip (gzip (str->bytes " test it!" )))))
You can’t perform that action at this time.
0 commit comments