func ReadBlob(ctx context.Context, provider Provider, dgst digest.Digest) ([]byte, error) {
	ra, err := provider.ReaderAt(ctx, dgst)
	if err != nil {
		return nil, err
	}
	defer ra.Close()
	p := make([]byte, ra.Size())
	_, err = ra.ReadAt(p, 0)
	return p, err
}
ReadBlob retrieves the entire contents of the blob from the provider.

Avoid using this for large blobs, such as layers.
package content
import (
	"context"
	"io"
	"io/ioutil"
	"sync"
	"github.com/containerd/containerd/errdefs"
	"github.com/opencontainers/go-digest"
	"github.com/pkg/errors"
)
var bufPool = sync.Pool{
	New: func() interface{} {
		buffer := make([]byte, 1<<20)
		return &buffer
	},
}
func NewReader(ra ReaderAt) io.Reader {
	rd := io.NewSectionReader(ra, 0, ra.Size())
	return rd
}