deflate

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoCompression      = flate.NoCompression
	BestSpeed          = flate.BestSpeed
	BestCompression    = flate.BestCompression
	DefaultCompression = flate.DefaultCompression
	HuffmanOnly        = flate.HuffmanOnly
)
View Source
const InvalidDist = 30

Variables

This section is empty.

Functions

func NewDynCompressor

func NewDynCompressor(w io.Writer, level int, windowSize int) *dynCompressor

func NewHuffmanOnly

func NewHuffmanOnly(w io.Writer) *huffmanOnly

Types

type BitBuf

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

func (*BitBuf) Sync

func (b *BitBuf) Sync()

func (*BitBuf) WriteBit

func (b *BitBuf) WriteBit(code uint16, count uint8)

type LevelCompressor

type LevelCompressor interface {
	Reset(w io.Writer)
	Accumulate(data []byte) (n int, trigger bool)
	Compress() error
	Flush() error
	Close() error
}

type Writer

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

func NewWriter

func NewWriter(under io.Writer, level int) (w *Writer, err error)

func NewWriterDict

func NewWriterDict(under io.Writer, level int, dict []byte) (w *Writer, err error)

func NewWriterwWith4KWindow

func NewWriterwWith4KWindow(under io.Writer, level int) (w *Writer, err error)

func (*Writer) Close

func (w *Writer) Close() (err error)

func (*Writer) Flush

func (w *Writer) Flush() (err error)

func (*Writer) Reset

func (w *Writer) Reset(under io.Writer)

func (*Writer) Write

func (w *Writer) Write(data []byte) (n int, err error)

Jump to

Keyboard shortcuts

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