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

compress

package
v3.61.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrotliReader

type BrotliReader struct {
	Body io.ReadCloser // underlying Response.Body
	// contains filtered or unexported fields
}

func NewBrotliReader

func NewBrotliReader(body io.ReadCloser) *BrotliReader

func (*BrotliReader) Close

func (br *BrotliReader) Close() error

func (*BrotliReader) GetUnderlyingBody

func (br *BrotliReader) GetUnderlyingBody() io.ReadCloser

func (*BrotliReader) Read

func (br *BrotliReader) Read(p []byte) (n int, err error)

func (*BrotliReader) SetUnderlyingBody

func (br *BrotliReader) SetUnderlyingBody(body io.ReadCloser)

type CompressReader

type CompressReader interface {
	io.ReadCloser
	GetUnderlyingBody() io.ReadCloser
	SetUnderlyingBody(body io.ReadCloser)
}

func NewCompressReader

func NewCompressReader(body io.ReadCloser, contentEncoding string) CompressReader

type DeflateReader

type DeflateReader struct {
	Body io.ReadCloser // underlying Response.Body
	// contains filtered or unexported fields
}

func NewDeflateReader

func NewDeflateReader(body io.ReadCloser) *DeflateReader

func (*DeflateReader) Close

func (df *DeflateReader) Close() error

func (*DeflateReader) GetUnderlyingBody

func (df *DeflateReader) GetUnderlyingBody() io.ReadCloser

func (*DeflateReader) Read

func (df *DeflateReader) Read(p []byte) (n int, err error)

func (*DeflateReader) SetUnderlyingBody

func (df *DeflateReader) SetUnderlyingBody(body io.ReadCloser)

type GzipReader

type GzipReader struct {
	Body io.ReadCloser // underlying Response.Body
	// contains filtered or unexported fields
}

GzipReader wraps a response body so it can lazily call gzip.NewReader on the first call to Read

func NewGzipReader

func NewGzipReader(body io.ReadCloser) *GzipReader

func (*GzipReader) Close

func (gz *GzipReader) Close() error

func (*GzipReader) GetUnderlyingBody

func (gz *GzipReader) GetUnderlyingBody() io.ReadCloser

func (*GzipReader) Read

func (gz *GzipReader) Read(p []byte) (n int, err error)

func (*GzipReader) SetUnderlyingBody

func (gz *GzipReader) SetUnderlyingBody(body io.ReadCloser)

type ZstdReader

type ZstdReader struct {
	Body io.ReadCloser // underlying Response.Body
	// contains filtered or unexported fields
}

func NewZstdReader

func NewZstdReader(body io.ReadCloser) *ZstdReader

func (*ZstdReader) Close

func (zr *ZstdReader) Close() error

func (*ZstdReader) GetUnderlyingBody

func (zr *ZstdReader) GetUnderlyingBody() io.ReadCloser

func (*ZstdReader) Read

func (zr *ZstdReader) Read(p []byte) (n int, err error)

func (*ZstdReader) SetUnderlyingBody

func (zr *ZstdReader) SetUnderlyingBody(body io.ReadCloser)

Jump to

Keyboard shortcuts

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