switch MerkleCollapse to operating on an io.Reader