compression

package
v0.0.0-...-caedbbb Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCompressor

func NewCompressor(w io.Writer, compressionType string) (io.WriteCloser, error)

NewCompressor returns an io.WriteCloser that compresses its input. The compression type needs to be specified upfront. Only cheap compression is supported, as this is assembled on the fly, and acts as a poorman's content-encoding. It's the callers responsibility to close the reader when done.

func NewCompressorBySuffix

func NewCompressorBySuffix(w io.Writer, compressionSuffix string) (io.WriteCloser, error)

NewCompressorBySuffix returns an io.WriteCloser that compresses its input.

func NewDecompressor

func NewDecompressor(r io.Reader, compressionType string) (io.ReadCloser, error)

NewDecompressor decompresses contents from an io.Reader The compression type needs to be specified upfront. It's the callers responsibility to close the reader when done.

func NewDecompressorBySuffix

func NewDecompressorBySuffix(r io.Reader, compressionSuffix string) (io.ReadCloser, error)

func TypeToSuffix

func TypeToSuffix(compressionType string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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