gcompress

package
v2.0.0-...-cbac34e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package gcompress provides kinds of compression algorithms for binary/bytes data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gzip

func Gzip(data []byte) ([]byte, error)

Gzip compresses <data> with gzip algorithm.

func UnGzip

func UnGzip(data []byte) ([]byte, error)

UnGzip decompresses <data> with gzip algorithm.

func UnZipContent

func UnZipContent(data []byte, dest string, path ...string) error

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 thate the parameter <dest> should be a directory.

func UnZipFile

func UnZipFile(archive, dest string, path ...string) error

UnZipFile decompresses <archive> 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 thate the parameter <dest> should be a directory.

func UnZlib

func UnZlib(data []byte) ([]byte, error)

UnZlib decompresses <data> with zlib algorithm.

func ZipPath

func ZipPath(paths, dest string, prefix ...string) error

ZipPath compresses <paths> to <dest> using zip compressing algorithm. The unnecessary parameter <prefix> indicates the path prefix for zip file.

Note that parameter <paths> supports multiple paths join with ','.

func ZipPathWriter

func ZipPathWriter(paths string, writer io.Writer, prefix ...string) error

ZipPathWriter compresses <paths> to <writer> using zip compressing algorithm. The unnecessary parameter <prefix> indicates the path prefix for zip file.

Note that parameter <paths> supports multiple paths join with ','.

func Zlib

func Zlib(data []byte) ([]byte, error)

Zlib compresses <data> with zlib algorithm.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL