Documentation ¶
Overview ¶
Package gcompress provides kinds of compression algorithms for binary/bytes data.
Package gcompress provides kinds of compression algorithms for binary/bytes data.
Index ¶
- func Gzip(data []byte, level ...int) ([]byte, error)
- func GzipFile(src, dst string, level ...int) error
- func UnGzip(data []byte) ([]byte, error)
- func UnGzipFile(src, dst string) error
- func UnZipContent(data []byte, dest string, path ...string) error
- func UnZipFile(archive, dest string, path ...string) error
- func UnZlib(data []byte) ([]byte, error)
- func ZipPath(paths, dest string, prefix ...string) error
- func ZipPathWriter(paths string, writer io.Writer, prefix ...string) error
- func Zlib(data []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Gzip ¶
Gzip compresses <data> using gzip algorithm. The optional parameter <level> specifies the compression level from 1 to 9 which means from none to the best compression.
Note that it returns error if given <level> is invalid.
func UnGzipFile ¶
UnGzip decompresses file <src> to <dst> using gzip algorithm.
func UnZipContent ¶
UnZipContent decompresses <data> to <dest> using zip compressing algorithm. The parameter <path> specifies the unzipped path of <archive>, which can be used to specify part of the archive file to unzip.
Note that the parameter <dest> should be a directory.
func UnZipFile ¶
UnZipFile decompresses <archive> to <dest> using zip compressing algorithm. The optional parameter <path> specifies the unzipped path of <archive>, which can be used to specify part of the archive file to unzip.
Note that the parameter <dest> should be a directory.
func ZipPath ¶
ZipPath compresses <paths> to <dest> using zip compressing algorithm. The unnecessary parameter <prefix> indicates the path prefix for zip file.
Note that the parameter <paths> can be either a directory or a file, which supports multiple paths join with ','.
func ZipPathWriter ¶
ZipPathWriter compresses <paths> to <writer> using zip compressing algorithm. The unnecessary parameter <prefix> indicates the path prefix for zip file.
Note that the parameter <paths> can be either a directory or a file, which supports multiple paths join with ','.
Types ¶
This section is empty.