 (ns org.altlaw.util.s3
+  (:require [org.altlaw.util.zip :as zip])
   (:import (org.jets3t.service.impl.rest.httpclient RestS3Service)
            (org.jets3t.service.model S3Bucket S3Object)
-           (org.jets3t.service.security AWSCredentials)))
+           (org.jets3t.service.security AWSCredentials)
+           (org.apache.commons.io IOUtils)
+           (java.io ByteArrayInputStream)
+           (java.util.zip GZIPInputStream)))
 
 (def #^{:private true} get-s3
      (memoize (fn [] (RestS3Service.

                               object-key))))

(defn get-object-stream [bucket-name object-key]
  (.getDataInputStream (get-object bucket-name object-key)))

     (.listObjects (get-s3) (get-bucket bucket-name)))
  ([bucket-name prefix]
     (.listObjects (get-s3) (get-bucket bucket-name) nil)))

(defn delete-object [bucket-name object-key]
  (.deleteObject (get-s3) bucket-name object-key))

(defn get-object [bucket-name object-key]
  (.getObject (get-s3) (get-bucket bucket-name) object-key))
