Created
April 1, 2012 20:59
-
-
Save anonymous/2278682 to your computer and use it in GitHub Desktop.
Attempting to zip on-the-fly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(with-open [zip (java.util.zip.ZipOutputStream. | |
(clojure.java.io/output-stream "foo.zip"))] | |
(-> zip (.putNextEntry (java.util.zip.ZipEntry. "foo.txt"))) | |
(.append (java.io.PrintWriter. zip true) "This is a string")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment