      OutputStream
      InputStream
      PipedInputStream
-     PipedOutputStream]
+     PipedOutputStream
+     ByteArrayOutputStream]
     [java.security
      MessageDigest]
     [java.nio


    in))

(def-compressor gzip
  [x options]
  (in->wrapped-out->in
    (bytes/to-input-stream x options)
    #(GzipCompressorOutputStream. %)
    options))


  [x options]
  (InflaterInputStream. (bytes/to-input-stream x options)))

(defn- in->wrapped-out->in
  [^InputStream stream output-wrapper options]
  (let [chunk-size (get options :chunk-size 65536)
        out (PipedOutputStream.)
        in (PipedInputStream. out chunk-size)
