gzip0

package
v0.0.0-...-d35dfd4 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2016 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package gzip0 implements writing of uncompressed (compression level 0) gzip files. The data in the files is uncompressed but still framed and checksummed, protecting against undetected corruption or truncation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

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

A Writer is an io.WriteCloser. Writes to a Writer are written to w in uncompressed gzip format.

func NewWriter

func NewWriter(w io.Writer) *Writer

NewWriter returns a new Writer. Writes to the returned Writer are written to w in uncompressed gzip format.

It is the caller's responsibility to call Close on the WriteCloser when done. Writes may be buffered and not flushed until Close.

func (*Writer) Close

func (w *Writer) Close() error

Close closes the Writer, flushing any unwritten data to the underlying io.Writer, but does not close the underlying io.Writer.

func (*Writer) Write

func (w *Writer) Write(b []byte) (int, error)

Write writes a compressed form of p to the underlying io.Writer. The compressed bytes are not necessarily flushed until the Writer is closed.

Jump to

Keyboard shortcuts

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