 (defn read-block
   "Creates a block by reading the source into memory and hashing it. This
   creates a realized block."
-  ^Block
+  ^blocks.data.Block
   [source algorithm]
   (let [hash-fn (checked-hash algorithm)
         content (bytes/to-byte-array source)]


  (equals
    [this that]
    (cond
      (identical? this that) true
      (instance? Block that)
        (and (= id   (:id   that))
             (= size (:size that)))
      :else false))

  (hashCode
    [this]
    (hash [Block id size]))


  clojure.lang.IHashEq

  (hasheq
    [this]
    (.hashCode this))


  java.lang.Comparable

(defn literal-block
  "Creates a block by reading a source into memory. The block is given the id
  directly, without being checked."
  ^blocks.data.Block
  [id source]
  (let [content (bytes/to-byte-array source)]
    (Block. id
