func (l *Layer) Uncompressed() (io.ReadCloser, error) {
	return nil, errors.New("NYI: stream.Layer.Uncompressed is not implemented")
}
Uncompressed implements v1.Layer.
package stream
import (
	"compress/gzip"
	"crypto/sha256"
	"encoding/hex"
	"errors"
	"hash"
	"io"
	v1 "github.com/google/go-containerregistry/pkg/v1"
)
var (
	ErrNotComputed = errors.New("value not computed until stream is consumed")
	ErrConsumed = errors.New("stream was already consumed")
)
type Layer struct {
	blob     io.ReadCloser
	consumed bool
	digest, diffID *v1.Hash
	size           int64
}
var _ v1.Layer = (*Layer)(nil)
func NewLayer(rc io.ReadCloser) *Layer { return &Layer{blob: rc} }
func (l *Layer) Digest() (v1.Hash, error) {
	if l.digest == nil {
		return v1.Hash{}, ErrNotComputed
	}
	return *l.digest, nil
}
func (l *Layer) DiffID() (v1.Hash, error) {
	if l.diffID == nil {
		return v1.Hash{}, ErrNotComputed
	}
	return *l.diffID, nil
}
func (l *Layer) Size() (int64, error) {
	if l.size == 0 {
		return 0, ErrNotComputed
	}
	return l.size, nil
}