package gzip

import "google.golang.org/grpc/encoding/gzip"

Package gzip implements and registers the gzip compressor during the initialization.

Experimental

Notice: This package is EXPERIMENTAL and may be changed or removed in a later release.

Index

Constants

const Name = "gzip"

Name is the name registered for the gzip compressor.

Functions

func SetLevel

func SetLevel(level int) error

SetLevel updates the registered gzip compressor to use the compression level specified (gzip.HuffmanOnly is not supported). NOTE: this function must only be called during initialization time (i.e. in an init() function), and is not thread-safe.

The error returned will be nil if the specified level is valid.

Source Files

gzip.go

Version
v1.70.0 (latest)
Published
Jan 23, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
17 hours ago

Tools for package owners.