Adds to every obitools the ability to save in gzip compressed files

This commit is contained in:
2023-02-18 12:06:52 +01:00
parent 1a08ad4254
commit 56722895e4
9 changed files with 85 additions and 66 deletions

View File

@ -110,17 +110,17 @@ func OptionDontCloseFile() WithOption {
return f
}
func OptionsAppendFile() WithOption {
func OptionsAppendFile(append bool) WithOption {
f := WithOption(func(opt Options) {
opt.pointer.appendfile = true
opt.pointer.appendfile = append
})
return f
}
func OptionsCompressed() WithOption {
func OptionsCompressed(compressed bool) WithOption {
f := WithOption(func(opt Options) {
opt.pointer.compressed = true
opt.pointer.compressed = compressed
})
return f