Multiple:
- Updated README - Added zstd support - Added go.mod and go.sum
This commit is contained in:
parent
b05b6b7183
commit
1a2ee9c5d5
|
@ -10,6 +10,7 @@ Run the executable and it'll ask you what file you are wanting to compress and w
|
|||
# Supported Compression Systems:
|
||||
- gzip
|
||||
- zlib
|
||||
- zstd
|
||||
|
||||
# TODO:
|
||||
- [ ] Have command line arguments
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
module digby
|
||||
|
||||
go 1.13
|
||||
|
||||
require github.com/DataDog/zstd v1.4.5 // indirect
|
|
@ -0,0 +1,2 @@
|
|||
github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ=
|
||||
github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
|
8
main.go
8
main.go
|
@ -11,6 +11,9 @@ import (
|
|||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
// Third-party packages
|
||||
"github.com/DataDog/zstd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -42,5 +45,10 @@ func main() {
|
|||
w := zlib.NewWriter(f)
|
||||
w.Write(data)
|
||||
w.Close()
|
||||
} else if *&comp == "zstd" {
|
||||
f, _ = os.Create(*&path + *&file + ".zst")
|
||||
w := zstd.NewWriter(f)
|
||||
w.Write(data)
|
||||
w.Close()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue