Skip to content

microwaves/archivebuffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

archivebuffer

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

Build Status

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 [email protected]

License

Please, refer to the LICENSE file.

About

Tarball and Gzip utilities with zero-stress.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages