func (a *Archive) Create(srcs []string, w io.Writer) (int64, error) {
	gw, err := gzip.NewWriterLevel(w, a.compressionLevel)
	if err != nil {
		return 0, fmt.Errorf("create archive writer, %w", err)
	}
	defer internal.CloseWithErrLogf(a.logger, gw, "gzip writer")
	return tar.New(a.logger, a.root, a.skipSymlinks).Create(srcs, gw)
}
Create writes content of the given source to an archive, returns written bytes.
package gzip
import (
	"compress/gzip"
	"fmt"
	"io"
	"github.com/meltwater/drone-cache/archive/tar"
	"github.com/meltwater/drone-cache/internal"
	"github.com/go-kit/kit/log"
)
type Archive struct {
	logger log.Logger
	root             string
	compressionLevel int
	skipSymlinks     bool
}
func New(logger log.Logger, root string, skipSymlinks bool, compressionLevel int) *Archive {
	return &Archive{logger, root, compressionLevel, skipSymlinks}
}