snappy

package
v0.0.0-...-77e5a9a Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: BSD-2-Clause, BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWriter

func NewWriter(dst io.Writer) *pack.Writer

Types

type Encoder

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

func (*Encoder) Encode

func (e *Encoder) Encode(dst []byte, src []byte, matches []pack.Match, lastBlock bool) []byte

func (*Encoder) Reset

func (e *Encoder) Reset()

type MatchFinder

type MatchFinder struct{}

MatchFinder is an implementation of the pack.MatchFinder interface based on the algorithm used by snappy.

func (MatchFinder) FindMatches

func (MatchFinder) FindMatches(dst []pack.Match, src []byte) []pack.Match

FindMatches looks for matches in src, appends them to dst, and returns dst. src must not be longer than 65536 bytes.

func (MatchFinder) Reset

func (MatchFinder) Reset()

Jump to

Keyboard shortcuts

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