Add xteve.xml GZIP

This commit is contained in:
marmei
2019-12-16 20:23:05 +01:00
parent aa763726a3
commit 91b80bc8bb
5 changed files with 28 additions and 3 deletions

View File

@@ -146,3 +146,20 @@ func extractGZIP(gzipBody []byte, fileSource string) (body []byte, err error) {
body = resB.Bytes()
return
}
func compressGZIP(data *[]byte, file string) (err error) {
if len(file) != 0 {
f, err := os.Create(file)
if err != nil {
return err
}
w := gzip.NewWriter(f)
w.Write(*data)
w.Close()
}
return
}