mirror of
https://github.com/c4milo/unpackit.git
synced 2025-09-26 19:01:11 +08:00
2ff65ef7c30b10208b0dbcf523df8784c42932ba
UnzipIt
This Go library allows you to easily unpack the following files:
- tar.gz
- tar.bzip2
- tar.xz
- zip
- tar
CGO is not involved nor hard dependencies of any type.
Usage
Unpack a file:
file, err := os.Open(test.filepath)
ok(t, err)
defer file.Close()
destPath, err := unzipit.Unpack(file, tempDir)
Unpack a stream (such as a http.Response):
res, err := http.Get(url)
destPath, err := unzipit.UnpackStream(res.Body, tempDir)
Languages
Go
100%