gziptest

package
v0.0.0-...-0bbbf19 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReader

func NewReader(t testing.TB, r io.Reader) *gzip.Reader

NewReader creates a new [Reader] reading the given reader. If r does not also implement io.ByteReader, the decompressor may read more data than necessary from r.

It is the caller's responsibility to call Close on the [Reader] when done.

The [Reader.Header] fields will be valid in the [Reader] returned.

func NewWriterLevel

func NewWriterLevel(t testing.TB, w io.Writer, level int) *gzip.Writer

NewWriterLevel is like [NewWriter] but specifies the compression level instead of assuming [DefaultCompression].

The compression level can be [DefaultCompression], [NoCompression], [HuffmanOnly] or any integer value between [BestSpeed] and [BestCompression] inclusive. The error returned will be nil if the level is valid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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