brotli

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: MIT Imports: 3 Imported by: 0

README

brotli

golang wrapper for brotli & cbrotli

Documentation

Index

Constants

View Source
const (
	BestSpeed          = 0
	BestCompression    = 11
	DefaultCompression = 6
)

Variables

This section is empty.

Functions

func NewFactory

func NewFactory(option *Options) func(context.Context, io.Writer) (io.WriteCloser, error)

func NewReader

func NewReader(r io.Reader) io.ReadCloser

func NewWriter

func NewWriter(w io.Writer, option *Options) io.WriteCloser

Types

type Options

type Options struct {
	// Quality controls the compression-speed vs compression-density trade-offs.
	// The higher the quality, the slower the compression. Range is 0 to 11.
	Quality int
	// LGWin is the base 2 logarithm of the sliding window size.
	// Range is 10 to 24. 0 indicates automatic configuration based on Quality.
	LGWin int
}

Options configures Writer.

Jump to

Keyboard shortcuts

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