    (wrap-headers codec (:header codec)))
   ([codec header]
    (HeaderCodec. header codec)))
-
-
-;; Remove automatic constructor functions.
-(ns-unmap *ns* '->HeaderCodec)
-(ns-unmap *ns* 'map->HeaderCodec)
 
 
 

      (.toByteArray baos))))


(defn bin-codec
  "Creates a new binary codec."
  []
  (BinaryCodec. (mc/headers :bin)))


;; Remove automatic constructor functions.
(ns-unmap *ns* '->BinaryCodec)
(ns-unmap *ns* 'map->BinaryCodec)




      (mc/decode! codec input))))


;; Remove automatic constructor functions.
(ns-unmap *ns* '->HeaderCodec)
(ns-unmap *ns* 'map->HeaderCodec)


(defn wrap-headers
  "Creates a new codec which will write the header for the wrapped codec before
  calling it. When decoding, it will read the header before calling the wrapped
