Skip to content

Instantly share code, notes, and snippets.

@tomjack
Created June 4, 2012 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomjack/6fe33dc93b1b15634245 to your computer and use it in GitHub Desktop.
Save tomjack/6fe33dc93b1b15634245 to your computer and use it in GitHub Desktop.
clj-gunzip.core> (let [gzipped (java.io.ByteArrayOutputStream.)
gunzipped (java.io.ByteArrayOutputStream.)]
(gzip (io/input-stream (.getBytes "foo")) gzipped)
(gunzip (io/input-stream (.toByteArray gzipped)) gunzipped)
(String. (.toByteArray gunzipped)))
"foo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment