zlib

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: ISC Imports: 6 Imported by: 0

Documentation

Overview

Package zlib provides abstractions on top of compress/zlib to work with Discord's method of compressing websocket packets.

Index

Constants

This section is empty.

Variables

View Source
var ErrPartial = errors.New("only partial payload in buffer")
View Source
var Suffix = [4]byte{'\x00', '\x00', '\xff', '\xff'}

Functions

This section is empty.

Types

type Inflator

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

func NewInflator

func NewInflator() *Inflator

func (*Inflator) CanFlush

func (i *Inflator) CanFlush() bool

CanFlush returns if Flush() should be called.

func (*Inflator) Flush

func (i *Inflator) Flush() ([]byte, error)

func (*Inflator) Write

func (i *Inflator) Write(p []byte) (n int, err error)

type Reader

type Reader interface {
	io.ReadCloser
	zlib.Resetter
}

Jump to

Keyboard shortcuts

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