gzip

package
v0.37.5 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Is

func Is(r io.Reader) (bool, error)

Is detects whether the input stream is compressed.

func ReadCloser

func ReadCloser(r io.ReadCloser) io.ReadCloser

ReadCloser reads uncompressed input data from the io.ReadCloser and returns an io.ReadCloser from which compressed data may be read. This uses gzip.BestSpeed for the compression level.

func ReadCloserLevel

func ReadCloserLevel(r io.ReadCloser, level int) io.ReadCloser

ReadCloserLevel reads uncompressed input data from the io.ReadCloser and returns an io.ReadCloser from which compressed data may be read. Refer to compress/gzip for the level: https://golang.org/pkg/compress/gzip/#pkg-constants

func UnzipReadCloser

func UnzipReadCloser(r io.ReadCloser) (io.ReadCloser, error)

UnzipReadCloser reads compressed input data from the io.ReadCloser and returns an io.ReadCloser from which uncompressed data may be read.

Types

This section is empty.

Jump to

Keyboard shortcuts

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