    (:d  compressed-bases-low) \D
    (:b  compressed-bases-low) \B})
 
-(definline compressed-base->char-low
+(defn compressed-base->char-low
   "Convert from BAM nybble representation of a base in low-order nybble to a char."
   [base]
-  `(let [base# ~base]
-     (or
-       (_compressed-base->char-low (ubyte (bit-and base# 0xf)))
-       (throw (IllegalArgumentException. (str "Bad type: " base#))))))
+  (or
+   (_compressed-base->char-low (ubyte (bit-and base 0xf)))
+   (throw (IllegalArgumentException. (str "Bad type: " base)))))
 
 (def ^:private _compressed-base->char-high
   {(:eq compressed-bases-high) \=

   (:d  compressed-bases-high) \D
   (:b  compressed-bases-high) \B})

(definline compressed-base->char-high
  "Convert from BAM nybble representation of a base in high-order nybble to a char."
  [base]
  `(let [base# ~base]
     (or
       (_compressed-base->char-high (ubyte (bit-and base# 0xf0)))
       (throw (IllegalArgumentException. (str "Bad type: " base#))))))

(defn bytes->compressed-bases [^bytes read-bases]
  (let [rlen (alength read-bases)

                   [\d \D]    (:d  compressed-bases-low)
                   [\b \B]    (:b  compressed-bases-low)}))

(defn char->compressed-base-low
  "Convert from a char to BAM nybble representation of a base in low-order nybble."
  [base]
  (or
   (_char->compressed-base-low base)
   (throw (IllegalArgumentException. (str "Bad type: " base)))))

(def ^:private _char->compressed-base-high
  (unfold-ksv-map {[\=]       (:eq compressed-bases-high)
