 (defn- capturing-reader
   "Wraps the given reader with a proxy which records the characters read to the
   given writer."
-  [input output]
-  (proxy [FilterReader] [input]
+  [^Reader reader
+   ^Writer writer]
+  (proxy [FilterReader] [reader]
     (read []
-      (let [c (.read input)]
-        (.write output c)
+      (let [c (.read reader)]
+        (.write writer c)
         c))))
 
 

    [puget.data]
    [puget.printer :as puget])
  (:import
    java.io.ByteArrayOutputStream
    java.io.FilterReader
    java.io.InputStreamReader
    java.io.OutputStreamWriter
    java.io.PushbackReader
    java.nio.charset.Charset))


;; CONSTANTS & CONFIGURATION

(def blob-charset
  (Charset/forName "UTF-8"))



  data blob. The result is true if the header matches, and the stream is left
  positioned after the header bytes. Otherwise, it is reset back to the start of
  the stream."
  [^InputStream input]
  (let [magic-bytes (.getBytes blob-header blob-charset)
        magic-len (count magic-bytes)
        header-bytes (byte-array magic-len)]
