mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Add capacity to obidistribute to save gzipped files
This commit is contained in:
@ -14,6 +14,7 @@ type __options__ struct {
|
||||
parallel_workers int
|
||||
closefile bool
|
||||
appendfile bool
|
||||
compressed bool
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
@ -33,6 +34,7 @@ func MakeOptions(setters []WithOption) Options {
|
||||
batch_size: 5000,
|
||||
closefile: false,
|
||||
appendfile: false,
|
||||
compressed: false,
|
||||
}
|
||||
|
||||
opt := Options{&o}
|
||||
@ -80,6 +82,10 @@ func (opt Options) AppendFile() bool {
|
||||
return opt.pointer.appendfile
|
||||
}
|
||||
|
||||
func (opt Options) CompressedFile() bool {
|
||||
return opt.pointer.compressed
|
||||
}
|
||||
|
||||
func OptionsBufferSize(size int) WithOption {
|
||||
f := WithOption(func(opt Options) {
|
||||
opt.pointer.buffer_size = size
|
||||
@ -112,6 +118,14 @@ func OptionsAppendFile() WithOption {
|
||||
return f
|
||||
}
|
||||
|
||||
func OptionsCompressed() WithOption {
|
||||
f := WithOption(func(opt Options) {
|
||||
opt.pointer.compressed = true
|
||||
})
|
||||
|
||||
return f
|
||||
}
|
||||
|
||||
func OptionsNewFile() WithOption {
|
||||
f := WithOption(func(opt Options) {
|
||||
opt.pointer.appendfile = false
|
||||
|
Reference in New Issue
Block a user