func UncompressedToImage(uic UncompressedImageCore) (v1.Image, error) {
	return &uncompressedImageExtender{
		UncompressedImageCore: uic,
	}, nil
}
UncompressedToImage fills in the missing methods from an UncompressedImageCore so that it implements v1.Image.
package partial
import (
	"bytes"
	"io"
	"sync"
	v1 "github.com/google/go-containerregistry/pkg/v1"
	"github.com/google/go-containerregistry/pkg/v1/types"
	"github.com/google/go-containerregistry/pkg/v1/v1util"
)
type UncompressedLayer interface {
	DiffID() (v1.Hash, error)
	Uncompressed() (io.ReadCloser, error)
}
type uncompressedLayerExtender struct {
	UncompressedLayer
	hash          v1.Hash
	size          int64
	hashSizeError error
	once          sync.Once
}
func (ule *uncompressedLayerExtender) Compressed() (io.ReadCloser, error) {
	u, err := ule.Uncompressed()
	if err != nil {
		return nil, err
	}
	return v1util.GzipReadCloser(u)
}
func (ule *uncompressedLayerExtender) Digest() (v1.Hash, error) {
	ule.calcSizeHash()
	return ule.hash, ule.hashSizeError
}
func (ule *uncompressedLayerExtender) Size() (int64, error) {
	ule.calcSizeHash()
	return ule.size, ule.hashSizeError
}
func (ule *uncompressedLayerExtender) calcSizeHash() {
	ule.once.Do(func() {
		var r io.ReadCloser
		r, ule.hashSizeError = ule.Compressed()
		if ule.hashSizeError != nil {
			return
		}
		defer r.Close()
		ule.hash, ule.size, ule.hashSizeError = v1.SHA256(r)
	})
}
func UncompressedToLayer(ul UncompressedLayer) (v1.Layer, error) {
	return &uncompressedLayerExtender{UncompressedLayer: ul}, nil
}
type UncompressedImageCore interface {
	imageCore
	LayerByDiffID(v1.Hash) (UncompressedLayer, error)
}