Multiple:

- Updated README
- Added zstd support
- Added go.mod and go.sum
This commit is contained in:
Donnie 2021-01-06 20:33:35 -06:00
parent b05b6b7183
commit 1a2ee9c5d5
4 changed files with 16 additions and 0 deletions

View File

@ -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

5
go.mod Normal file
View File

@ -0,0 +1,5 @@
module digby
go 1.13
require github.com/DataDog/zstd v1.4.5 // indirect

2
go.sum Normal file
View File

@ -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=

View File

@ -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()
}
}