Skip to content

Commit c87069e

Browse files
committed
v0.2.0
1 parent aa659b7 commit c87069e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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"

src/zlib_tiny/core.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
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
@@ -78,6 +78,6 @@
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!")))))

0 commit comments

Comments
 (0)