file

package
v3.3.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

View Source
const (
	GZipImplEnvVarKey = "GZIP_IMPLEMENTATION"
	GZIP              = "GZip"
	PGZIP             = "PGZip"
)

Variables

This section is empty.

Functions

func CompressContent

func CompressContent(content []byte) []byte

CompressContent will compress the byte array using zip writer

func CompressEncodeString

func CompressEncodeString(content string) string

CompressEncodeString will return the compressed string with base64 encoded

func DecodeDecompressString

func DecodeDecompressString(content string) (string, error)

DecodeDecompressString will return decode and decompress the

func DecompressContent

func DecompressContent(content []byte) ([]byte, error)

DecompressContent will return the uncompressed content

func ExistsInTar

func ExistsInTar(sourcePath string, tarReader TarReader) bool

ExistsInTar return true if file or directory exists in tar

func GetGzipReader added in v3.1.0

func GetGzipReader(reader io.Reader) (io.ReadCloser, error)

GetGzipReader gets the GzipReader based on `GZipImplEnvVarKey` environment variable.

Types

type TarReader

type TarReader interface {
	Next() (*tar.Header, error)
}

Jump to

Keyboard shortcuts

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