                  (bit-shift-right-zero-fill vlq vlq-base-shift)))
         (.append sb (base64/encode digit))))
     (str sb)))
+
+(defn encode [v]
+  (apply str (map encode-val v)))
 
 (defn decode [^String s]
   (let [l (.length s)]

      (- shifted)
      shifted)))

(defn encode [v]
  (let [sb (StringBuilder.)
        vlq (to-vlq-signed v)]
    (loop [digit (bit-and vlq vlq-base-mask)
           vlq   (bit-shift-right-zero-fill vlq vlq-base-shift)]
      (if (pos? vlq)


  ;; Base64 VLQ can only represent 32bit values

  (encode-val 32) ; "gC"
  (decode "gC") ; {:value 32 :rest ""}

  (decode "AAgBC") ; (0 0 16 1)
