gzipimpl

package
v0.77.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package gzipimpl provides a set of functions for compressing with zlib / zstd / gzip

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New returns a new GzipStrategy

Types

type GzipStrategy

type GzipStrategy struct {
	// contains filtered or unexported fields
}

GzipStrategy is the strategy for when serializer_compression_kind is gzip

func (*GzipStrategy) Compress

func (s *GzipStrategy) Compress(src []byte) (result []byte, err error)

Compress will compress the data with gzip

func (*GzipStrategy) CompressBound

func (s *GzipStrategy) CompressBound(sourceLen int) int

CompressBound returns the worst case size needed for a destination buffer when using gzip. Return value will be > `sourceLen`.

func (*GzipStrategy) ContentEncoding

func (s *GzipStrategy) ContentEncoding() string

ContentEncoding returns the content encoding value for gzip

func (*GzipStrategy) Decompress

func (s *GzipStrategy) Decompress(src []byte) ([]byte, error)

Decompress will decompress the data with gzip

func (*GzipStrategy) NewStreamCompressor

func (s *GzipStrategy) NewStreamCompressor(output *bytes.Buffer) compression.StreamCompressor

NewStreamCompressor returns a new gzip Writer

type Requires

type Requires struct {
	Level int
}

Requires contains the compression level for gzip compression

Jump to

Keyboard shortcuts

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