mirror of
https://github.com/c4milo/unpackit.git
synced 2025-09-26 19:01:11 +08:00
4ed373e9ef1c895fe04468d813cb628902d89a0a
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 := unpackit.Unpack(file, tempDir)
Unpack a stream (such as a http.Response):
res, err := http.Get(url)
destPath, err := unpackit.Unpack(res.Body, tempDir)
Languages
Go
100%