 ;; Decoding
 ;; -----------------------------------------------------------
 
-(defn ^:private decode-one
+(defn ^:private decode-one ;; TODO - Could be made a step function of a transducer
   [{:keys [values lhs rhs]} bits]
   (cond
     (= 1 (count values)) [(first values) bits]

  (get-bits-impl huffman-tree []))

(defn tree->encoder
  "Build a decoder with memoization"
  [huffman-tree]
  (memoize #(get-bits huffman-tree %)))


    (= 1 (first bits)) (recur rhs (rest bits))
    ))

(defn decode
  "Encode a stream of values with the huffman tree provided as first parameter"
  [huffman-tree inputs]
  (loop [bits inputs
         result []]
