compress

package
v0.0.48 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compress

type Compress interface {
	ExtractFiles(sourceFile, targetName string) error
}

Compress is a common compress interface

func GetCompressor added in v0.0.46

func GetCompressor(extension string, additionBinaries []string) Compress

GetCompressor gets the compressor base on file extension

type GZip

type GZip struct {
	// contains filtered or unexported fields
}

GZip implements a compress which based is based on gzip

func NewGZip

func NewGZip(additionBinaries []string) *GZip

NewGZip creates an instance of GZip additionBinaries could be empty or nil

func (*GZip) ExtractFiles

func (c *GZip) ExtractFiles(sourceFile, targetName string) (err error)

ExtractFiles extracts files from a target compress file

type Xz added in v0.0.45

type Xz struct {
	// contains filtered or unexported fields
}

Xz implements a compress which based is based on xz

func NewXz added in v0.0.45

func NewXz(additionBinaries []string) *Xz

NewXz creates an instance of Xz

func (*Xz) ExtractFiles added in v0.0.45

func (x *Xz) ExtractFiles(sourceFile, targetName string) (err error)

ExtractFiles extracts files from a target compress file

type Zip added in v0.0.46

type Zip struct {
	// contains filtered or unexported fields
}

Zip implements a compress which is base on zip file

func NewZip added in v0.0.46

func NewZip(additionBinaries []string) *Zip

NewZip creates an instance of zip

func (*Zip) ExtractFiles added in v0.0.46

func (z *Zip) ExtractFiles(sourceFile, targetName string) (err error)

ExtractFiles extracts files from a target compress file

Jump to

Keyboard shortcuts

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