https://github.com/microwaves/archivebuffer
Tarball and Gzip utilities with zero-stress.
https://github.com/microwaves/archivebuffer
archiving compression gzip tar tarball
Last synced: 3 months ago
JSON representation
Tarball and Gzip utilities with zero-stress.
- Host: GitHub
- URL: https://github.com/microwaves/archivebuffer
- Owner: microwaves
- License: bsd-3-clause
- Created: 2017-09-06T09:28:33.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-22T12:39:23.000Z (about 8 years ago)
- Last Synced: 2025-02-15T10:16:27.247Z (8 months ago)
- Topics: archiving, compression, gzip, tar, tarball
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# archivebuffer
Utilities to help creating tarballs, untar, gzip and ungzip.
[](https://travis-ci.org/microwaves/archivebuffer)
## NewTarballBuffer()
Creates a tarball from a source file or directory and returns a `*bytes.Buffer`.
### Usage
```
tarBuf, err := NewTarballBuffer("/tmp/foobar")
if != err {
// handle error
}
```## UntarToFile()
Receives a tar wrapped in an `io.Reader` and unarchives it to a determined path.
### Usage
```
err := UntarToFile(tarBuf, "/tmp")
if != err {
// handle error
}
```## NewGzipBuffer()
Creates a new Gzip from an `io.Reader` and returns a `*bytes.Buffer`.
### Usage
```
gzipBuf, err := NewGzipBuffer(tarBuf)
if != err {
// handle error
}
```## UngzipToBuffer()
Receives a Gzip wrapped in an `io.Reader` and returns a `*bytes.Buffer`.
### Usage
```
ungzipBuf, err := UngzipToBuffer(gzipBuf)
if != err {
// handle error
}
```## Maintainers
Stephano Zanzin
## License
Please, refer to the [LICENSE](LICENSE) file.