package
0.0.0-20240519111142-3e416e18f32e
Repository: https://github.com/snail007/gmc.git
Documentation: pkg.go.dev
# README
UnpackIt
This Go library allows you to easily unpack the following files using magic numbers:
- tar.gz
- tar.bzip2
- tar.xz
- zip
- tar
Usage
Unpack a file:
file, _ := os.Open(test.filepath)
destPath, err := gcompress.Unpack(file, tempDir)
Unpack a stream (such as a http.Response):
res, err := http.Get(url)
destPath, err := gcompress.Unpack(res.Body, tempDir)