(data *[]byte, file string)
| 148 | } |
| 149 | |
| 150 | func compressGZIP(data *[]byte, file string) (err error) { |
| 151 | |
| 152 | if len(file) != 0 { |
| 153 | |
| 154 | f, err := os.Create(file) |
| 155 | if err != nil { |
| 156 | return err |
| 157 | } |
| 158 | |
| 159 | w := gzip.NewWriter(f) |
| 160 | w.Write(*data) |
| 161 | w.Close() |
| 162 | } |
| 163 | |
| 164 | return |
| 165 | } |