Documentation ¶
Overview ¶
Package unzipit allows you to easily unpack *.tar.gz, *.tar.bzip2, *.zip and *.tar files. There are not CGO involved nor hard dependencies of any type.
Package unzipit allows you to easily unpack *.tar.gz, *.tar.bzip2, *.zip and *.tar files. There are not CGO involved nor hard dependencies of any type.
Index ¶
- func Bunzip2(file *os.File) (*bufio.Reader, error)
- func Bunzip2Stream(reader io.Reader) (*bufio.Reader, error)
- func Gunzip(file *os.File) (*bufio.Reader, error)
- func GunzipStream(reader io.Reader) (*bufio.Reader, error)
- func Unpack(file *os.File, destPath string) (string, error)
- func UnpackStream(reader io.Reader, destPath string) (string, error)
- func Untar(data io.Reader, destPath string) (string, error)
- func Unzip(file *os.File, destPath string) (string, error)
- func UnzipStream(r io.Reader, destPath string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bunzip2Stream ¶
Bunzip2Stream unpacks a bzip2 stream
func GunzipStream ¶
GunzipStream unpacks a gzipped stream
func Unpack ¶
Unpack unpacks a compressed and archived file and places result output in destination path.
File formats supported are:
- .tar.gz
- .tar.bzip2
- .zip
- .tar
If it cannot recognize the file format, it will save the file, as is, to the destination path.
func UnpackStream ¶
UnpackStream unpacks a compressed stream. Note that if the stream is a using ZIP compression (but only ZIP compression), it's going to get buffered in its entirety to memory prior to decompression.
Types ¶
This section is empty.