 (defn- read-secondary-values!
   "Reads the secondary EDN values from a data blob. Returns a seq of the values
   read."
-  [tag-readers reader]
+  [tag-readers
+   ^Reader reader]
   (let [opts {:eof ::end-stream
               :readers tag-readers}
-        reader (PushbackReader. reader)
         read-stream (partial edn/read opts reader)
         edn-stream (repeatedly read-stream)
         not-eos? (partial not= ::end-stream)]

(ns vault.data.format.edn
  "Functions to read structured data formatted as EDN."
  (:require
    [byte-streams :refer [bytes=]]
    [clojure.string :as str]

(def ^:private ^:const blob-width
  "Width of text to use in serialized blobs."
  100)


(defn data-type
  "Determines the 'type' of the given value. By default, the result is just the
  class of the value. For maps, the :vault.data/type key is used if present.
  This is the main way types are represented in the data layer."
  [v]
  (or (when (map? v)
        (:vault.data/type v))
      (class v)))



