archive: add CompressLevel type and consts (MR 25)
There's really not a great way to map individual levels to each compression library, so this just adds a new type that will invoke the three relevant levels for each library used. This could be improved in the future.
This commit is contained in:
@@ -29,6 +29,17 @@ const (
|
||||
FormatZstd CompressFormat = "zstd"
|
||||
)
|
||||
|
||||
type CompressLevel string
|
||||
|
||||
const (
|
||||
// Mapped to the "default" level for the given format
|
||||
LevelDefault CompressLevel = "default"
|
||||
// Maps to the fastest compression level for the given format
|
||||
LevelFast CompressLevel = "fast"
|
||||
// Maps to the best compression level for the given format
|
||||
LevelBest CompressLevel = "best"
|
||||
)
|
||||
|
||||
type Archive struct {
|
||||
items archiveItems
|
||||
cpioWriter *cpio.Writer
|
||||
|
Reference in New Issue
Block a user