gzipimpl

package
v0.85.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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