extensions

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Filename string
	Level    int
}

func NewGzip

func NewGzip(level int) *Options

func (*Options) Compress

func (opts *Options) Compress() error

Compress reads the file stream to write compressed data use io.Pipe and a goroutine to create reader on data written by the appliation.

Then copy file through gzip to pipe writer with chosen compression algorithm level This uses CloseWithError to propgate errors back to the main goroutine. Then flush to the writer stream

Jump to

Keyboard shortcuts

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