brotli

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 3 Imported by: 1

README

Brotli Decoder for Go

Go Reference Go Report Card Widget

Introduction

This package is a brotli decompressor implemented in pure Go.

This package is a brotli compressor and decompressor implemented in Go.

It was translated from the reference implementation (https://github.com/google/brotli) with the `c2go** tool at https://github.com/andybalholm/c2go.

Upstream

This package is a fork of the upstream project to create a more minimal package with just the decoder and not the encoder.

This is a significantly lighter package in terms of binary size.

It was created by deleting the writer types and then repeatedly removing all unused symbols (detected with the gounused linter).

If you need the brotli compressor, see the upstream project.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

func NewReader

func NewReader(src io.Reader) *Reader

NewReader creates a new Reader reading the given reader.

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

func (*Reader) Reset

func (r *Reader) Reset(src io.Reader) error

Reset discards the Reader's state and makes it equivalent to the result of its original state from NewReader, but reading from src instead. This permits reusing a Reader rather than allocating a new one. Error is always nil

Jump to

Keyboard shortcuts

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