An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# archivebuffer

Utilities to help creating tarballs, untar, gzip and ungzip.

[![Build Status](https://travis-ci.org/microwaves/archivebuffer.svg?branch=master)](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.