mirror of
https://github.com/kopia/kopia.git
synced 2026-10-21 21:54:41 -04:00
moved all compression to separate package and sanitized identifiers
This commit is contained in:
1 parent
8ab93e0e2f
commit
2ba4e83cef
14 files changed
+124
-93
No files matched your search
@@ -7,7 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/kopia/kopia/internal/units"
|
||||
"github.com/kopia/kopia/repo/object"
|
||||
"github.com/kopia/kopia/repo/compression"
|
||||
|
||||
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
||||
)
|
||||
@@ -23,7 +23,7 @@ var (
|
||||
|
||||
func runBenchmarkCompressionAction(ctx *kingpin.ParseContext) error {
|
||||
type benchResult struct {
|
||||
compression object.CompressorName
|
||||
compression compression.Name
|
||||
throughput float64
|
||||
compressedSize int64
|
||||
}
|
||||
@@ -41,7 +41,7 @@ func runBenchmarkCompressionAction(ctx *kingpin.ParseContext) error {
|
||||
data = d
|
||||
}
|
||||
|
||||
for name, comp := range object.CompressorsByName {
|
||||
for name, comp := range compression.ByName {
|
||||
log.Infof("Benchmarking compressor '%v' (%v x %v bytes)", name, *benchmarkCompressionRepeat, len(data))
|
||||
|
||||
t0 := time.Now()
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/kopia/kopia/repo"
|
||||
"github.com/kopia/kopia/repo/object"
|
||||
"github.com/kopia/kopia/repo/compression"
|
||||
"github.com/kopia/kopia/snapshot/policy"
|
||||
)
|
||||
|
||||
@@ -234,7 +234,7 @@ func setCompressionPolicyFromFlags(p *policy.CompressionPolicy, changeCount *int
|
||||
} else {
|
||||
printStderr(" - setting compression algorithm to %v\n", v)
|
||||
|
||||
p.CompressorName = object.CompressorName(v)
|
||||
p.CompressorName = compression.Name(v)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ func applyPolicyNumber64(desc string, val *int64, str string, changeCount *int)
|
||||
|
||||
func supportedCompressionAlgorithms() []string {
|
||||
var res []string
|
||||
for name := range object.CompressorsByName {
|
||||
for name := range compression.ByName {
|
||||
res = append(res, string(name))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user