func estimateDockerImageSize(collectionPDH string) int64 {
m := pdhRegexp.FindStringSubmatch(collectionPDH)
if m == nil {
func estimateDockerImageSize(collectionPDH string) int64 {
m := pdhRegexp.FindStringSubmatch(collectionPDH)
if m == nil {
return 0
}
n, err := strconv.ParseInt(m[1], 10, 64)
if err != nil || n < 122 {
return 0
}
n, err := strconv.ParseInt(m[1], 10, 64)
if err != nil || n < 122 {
// - Subtract 80 characters for the filename and file segment
// - Divide by 42 to get the number of block identifiers ('hash\+size\ ' is 32+1+8+1)
// - Assume each block is full, multiply by 64 MiB
// - Subtract 80 characters for the filename and file segment
// - Divide by 42 to get the number of block identifiers ('hash\+size\ ' is 32+1+8+1)
// - Assume each block is full, multiply by 64 MiB