cljs.repl.server/gzip

functionsince v1.10.126Edit
(gzip bytes)

Source code @ clojurescript:src/main/clojure/cljs/repl/server.clj
(defn ^bytes gzip [^bytes bytes]
  (let [baos (ByteArrayOutputStream. (count bytes))]
    (try
      (let [gzos (GZIPOutputStream. baos)]
        (try
          (.write gzos bytes)
          (finally
            (.close gzos))))
      (finally
        (.close baos)))
    (.toByteArray baos)))