brotli

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 2 Imported by: 2

README

connect-brotli

GoDoc

This package provides improved compression schemes for Buf Connect.

Compression is provided from the github.com/andybalholm/brotli package.

Usage

The brotli.WithCompression function will return an option that allow both client and servers to compress and decompress using brotli.

import "go.withmatt.com/connect-brotli"

opts := brotli.WithCompression()

To enable client compression and force a specific method use connect.WithSendCompression(brotli.Name).

For more details and options see the documentation.

Documentation

Index

Constants

View Source
const (
	BestSpeed          = brotli.BestSpeed
	BestCompression    = brotli.BestCompression
	DefaultCompression = brotli.DefaultCompression
)
View Source
const Name = "br"

Variables

This section is empty.

Functions

func WithCompression added in v0.2.0

func WithCompression() connect.Option

WithCompression returns client and handler options for the brotli compression method using the default compression level.

func WithCompressionLevel added in v0.2.0

func WithCompressionLevel(level int) connect.Option

WithCompressionLevel returns client and handler options for the brotli compression method for your prefered compression level.

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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