gzip

package
v0.0.0-...-c937a28 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package gzip implements reading and writing of gzip format compressed files. See the compress/gzip package for more details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	gzip.Reader
	// contains filtered or unexported fields
}

Reader is an io.Reader that can be read to retrieve uncompressed data from a gzip-format compressed file.

func NewReader

func NewReader(r io.Reader, name string) (*Reader, error)

NewReader creates a new Reader reading the given reader.

func (*Reader) NextFile

func (r *Reader) NextFile() (name string, err error)

NextFile returns the file name. Calls subsequent to the first call will return EOF.

type Writer

type Writer struct {
	gzip.Writer
	// contains filtered or unexported fields
}

Writer is an io.WriteCloser. Writes to a Writer are compressed and written to w.

func NewWriter

func NewWriter(w io.Writer) *Writer

NewWriter returns a new Writer. Writes to the returned writer are compressed and written to w.

func (*Writer) NextFile

func (w *Writer) NextFile(name string, _ os.FileInfo) error

NextFile never returns a next file, and should not be called more than once.

Jump to

Keyboard shortcuts

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