Help us shape the future of Go! Take the 2026 Go Developer Survey

compress

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

View Source
const CompressDefaultCompression = 6 // flate.DefaultCompression

Variables

This section is empty.

Functions

func AcquireGzipReader

func AcquireGzipReader(r io.Reader) (*gzip.Reader, error)

func AcquireStacklessGzipWriter

func AcquireStacklessGzipWriter(w io.Writer, level int) stackless.Writer

func AppendGunzipBytes

func AppendGunzipBytes(dst, src []byte) ([]byte, error)

AppendGunzipBytes appends gunzipped src to dst and returns the resulting dst.

func AppendGzipBytes

func AppendGzipBytes(dst, src []byte) []byte

AppendGzipBytes appends gzipped src to dst and returns the resulting dst.

func AppendGzipBytesLevel

func AppendGzipBytesLevel(dst, src []byte, level int) []byte

AppendGzipBytesLevel appends gzipped src to dst using the given compression level and returns the resulting dst.

Supported compression levels are:

  • CompressNoCompression
  • CompressBestSpeed
  • CompressBestCompression
  • CompressDefaultCompression
  • CompressHuffmanOnly

func ReleaseGzipReader

func ReleaseGzipReader(zr *gzip.Reader)

func ReleaseStacklessGzipWriter

func ReleaseStacklessGzipWriter(sw stackless.Writer, level int)

func WriteGunzip

func WriteGunzip(w io.Writer, p []byte) (int, error)

WriteGunzip writes gunzipped p to w and returns the number of uncompressed bytes written to w.

func WriteGzipLevel

func WriteGzipLevel(w io.Writer, p []byte, level int) (int, error)

WriteGzipLevel writes gzipped p to w using the given compression level and returns the number of compressed bytes written to w.

Supported compression levels are:

  • CompressNoCompression
  • CompressBestSpeed
  • CompressBestCompression
  • CompressDefaultCompression
  • CompressHuffmanOnly

Types

This section is empty.

Jump to

Keyboard shortcuts

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