   []
   (into #{} (map #(-> % .name keyword) (.codecs codecs))))
 
-(defn lookup-codec
+(defn ^Codec lookup-codec
   [name-or-content-type]
   (if-let [codec (.forName codecs (name name-or-content-type))]
     codec

     (decode [data#]
       (~decode data#))))

(defonce ^:private codecs
  (-> (Codecs.)
    (.add None/INSTANCE)))


     :type :bytes
     :encode (fn [data]
               (if-let [write (u/try-resolve 'clojure.data.fressian/write)]
                 (let [^ByteBuffer encoded (write data :footer? true)
                       bytes (byte-array (.remaining encoded))]
                   (.get encoded bytes)
                   bytes)
                 (throw (IllegalArgumentException.
                          "Can't encode fressian. Add org.clojure/data.fressian to your dependencies."))))
