compression

package
v0.0.5-dev.14 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compressor

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

func NewCompression

func NewCompression(fileStorage storageabstraction.IFileStorage) *Compressor

func (*Compressor) CompressDir

func (compressor *Compressor) CompressDir(path string, writer io.Writer) error

type ExtractFileCallback

type ExtractFileCallback func(relativeDir string, fileSize int64, readContent io.Reader)

ExtractFileCallback called if the current extraction is a file

type ExtractFolderCallback

type ExtractFolderCallback func(relativeDir string)

ExtractFolderCallback is called if the current extraction is a folder

type GzipExtractor

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

GzipExtractor The type of the compression

Contains the callbacks

func NewGzipExtractor

func NewGzipExtractor(storage storageabstraction.IFileStorage) *GzipExtractor

NewGzipExtractor Creates a new GzipExtractor object

func (*GzipExtractor) ExtractFromStream

func (extractor *GzipExtractor) ExtractFromStream(directory string, gzipStream io.Reader) ([]string, error)

ExtractFromStream Decompress the stream, for each file and folder the corresponding

Callbacks are called

Jump to

Keyboard shortcuts

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