extensions

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 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 {
	Level    int
	Filename string
}

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, which is the fs stream

is concurrent safe

Jump to

Keyboard shortcuts

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