Extension returns the extension of a file that uses the specified compression algorithm.
()
| 256 | |
| 257 | // Extension returns the extension of a file that uses the specified compression algorithm. |
| 258 | func (compression *Compression) Extension() string { |
| 259 | switch *compression { |
| 260 | case Gzip: |
| 261 | return "gz" |
| 262 | case Zstd: |
| 263 | return "zst" |
| 264 | case Unknown: |
| 265 | return "unknown" |
| 266 | } |
| 267 | return "" |
| 268 | } |
| 269 | |
| 270 | func gzipDecompress(ctx context.Context, buf io.Reader) (io.ReadCloser, error) { |
| 271 | initGzip.Do(func() { |
no outgoing calls
no test coverage detected