func GetVersionFromTarsum(tarsum string) (Version, error) {
	tsv := tarsum
	if strings.Contains(tarsum, "+") {
		tsv = strings.SplitN(tarsum, "+", 2)[0]
	}
	for v, s := range tarSumVersions {
		if s == tsv {
			return v, nil
		}
	}
	return -1, ErrNotVersion
}
GetVersionFromTarsum returns the Version from the provided string
package tarsum
import (
	"errors"
	"sort"
	"strconv"
	"strings"
	"github.com/jlhawn/tarsum/archive/tar"
)
type Version int
const (
	Version0 Version = iota
	Version1
	VersionDev
)
func GetVersions() []Version {
	v := []Version{}
	for k := range tarSumVersions {
		v = append(v, k)
	}
	return v
}
var tarSumVersions = map[Version]string{
	Version0:   "tarsum",
	Version1:   "tarsum.v1",
	VersionDev: "tarsum.dev",
}
func (tsv Version) String() string {
	return tarSumVersions[tsv]
}