 
 (defn take-boolean
   "Takes a boolean from `buffer`."
-  [^Buffer buffer]
+  [^MikronBuffer buffer]
   (let [bit-index (get-bit-index buffer)]
     (when (== 0 bit-index)
       (set-bit-value buffer (take-byte buffer)))


(defn take-binary
  "Takes a binary value from `buffer`."
  ^bytes [^Buffer buffer]
  (take-bytes buffer (take-varint buffer)))

(defn put-binary
  "Puts a binary value `value` to `buffer`."
  [^Buffer buffer ^bytes value]
  (doto buffer
    (put-varint #?(:clj  (alength value)
                   :cljs (.-byteLength value)))


(defn get-headers
  "Gets the headers of `buffer`."
  [^MikronBuffer buffer]
  (set-le buffer (take-boolean buffer))
  {:diffed? (take-boolean buffer)})

