       after  (drop-while #(pos? (compare after (str %))))
       prefix (take-while #(.startsWith (str %) prefix))
       limit  (take limit))))
+
+
+(defn scan-size
+  "Scans the blobs in a store to determine the total stored content size."
+  [store]
+  (reduce + 0 (map (comp :stat/size (partial stat store)) (list store))))



(defn get
  "Loads content for a hash-id and returns a Blob record. Returns nil if no
  blob is stored. The blob may contain `stat` metadata.

  This digest of the loaded content is checked against the requested hash-id."
  [store id]
  (when-let [blob (get* store id)]
    (let [digest (content/hash (:algorithm id) (:content blob))]


  (stat
    [store id]
    "Returns a blob record with metadata but no content.")

  (get*
    [store id]
    "Loads content for a hash-id and returns a blob record. Returns nil if no
    blob is stored. The blob should include stat metadata.")

  (put!
    [store blob]
    "Saves a blob into the store. Returns the blob record, updated with stat
    metadata.")

  (delete!
    [store id]
