https://github.com/yields/go-unpack
Tarball unpacking utility for Go
https://github.com/yields/go-unpack
Last synced: 11 months ago
JSON representation
Tarball unpacking utility for Go
- Host: GitHub
- URL: https://github.com/yields/go-unpack
- Owner: yields
- Created: 2014-07-06T20:06:17.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-06T21:05:01.000Z (almost 12 years ago)
- Last Synced: 2025-03-30T14:31:28.534Z (about 1 year ago)
- Language: Go
- Size: 146 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# go-unpack
Tarball unpacking utility.
## Installation
```
$ go get github.com/visionmedia/go-unpack
```
## Example
Example which copies some.tgz to "some/path",
creating the destination directories if required,
stripping 0 components.
```go
import . "github.com/visionmedia/go-unpack"
import "compress/gzip"
import "os"
func main() {
file, _ := os.Open("some.tgz")
reader, _ := gzip.NewReader(file)
err := UnpackTarball(reader, "some/path", 0)
}
```
# License
MIT