                                                                     (util/can-have-meta? value)
                                                                     (vary-meta assoc :tag 'long))
                                                                  0xFF))))})
-  [^Buffer buffer ^long value]
+  [^MikronBuffer buffer ^long value]
   (put-byte buffer (unchecked-byte (bit-and value 0xFF))))
 
 (defn take-ushort
   "Takes an unsigned short from `buffer`."
   #?(:clj {:inline (fn [buffer]
                      `(bit-and (take-short ~buffer) 0xFFFF))})
-  ^long [^Buffer buffer]
+  ^long [^MikronBuffer buffer]
   (bit-and (take-short buffer) 0xFFFF))
 
 (defn put-ushort


(defn finalize
  "Finalizes `buffer`."
  ^Buffer [^Buffer buffer]
  (let [bit-position (get-bit-position buffer)]
    (when-not (== -1 bit-position)
      (put-byte-at buffer bit-position (get-bit-value buffer)))


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

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