writer

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0, BSD-3-Clause, MIT, + 1 more Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GzipWriter

type GzipWriter interface {
	Write(p []byte) (int, error)
	Close() error
	Flush() error
}

GzipWriter implements the functions needed for compressing content.

type GzipWriterExt

type GzipWriterExt interface {
	GzipWriter

	// SetHeader will populate header fields with non-nil values in h.
	SetHeader(h Header)
}

GzipWriterExt implements the functions needed for compressing content and optional extensions.

type GzipWriterFactory

type GzipWriterFactory struct {
	// Must return the minimum and maximum supported level.
	Levels func() (min, max int)

	// New must return a new GzipWriter.
	// level will always be within the return limits above.
	New func(writer io.Writer, level int) GzipWriter
}

GzipWriterFactory contains the information needed for custom gzip implementations.

type Header struct {
	Comment string    // comment
	Extra   []byte    // "extra data"
	ModTime time.Time // modification time
	Name    string    // file name
	OS      byte      // operating system type
}

Header is a gzip header.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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