patricia

package
v0.0.0-...-66aa405 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Match

type Match struct {
	Val   interface{}
	Start int
	End   int
}

type MatchFinder

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

func NewMatchFinder

func NewMatchFinder(pt *PatriciaTree) *MatchFinder

func (*MatchFinder) FindLongestMatches

func (mf *MatchFinder) FindLongestMatches(data []byte) []Match

type MatchFinder2

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

func NewMatchFinder2

func NewMatchFinder2(pt *PatriciaTree) *MatchFinder2

func (*MatchFinder2) Current

func (mf2 *MatchFinder2) Current() ([]byte, int)

func (*MatchFinder2) FindLongestMatches

func (mf2 *MatchFinder2) FindLongestMatches(data []byte) []Match

type Matches

type Matches []Match

func (Matches) Len

func (m Matches) Len() int

func (Matches) Less

func (m Matches) Less(i, j int) bool

func (*Matches) Swap

func (m *Matches) Swap(i, j int)

type PatriciaTree

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

func (*PatriciaTree) Get

func (pt *PatriciaTree) Get(key []byte) (interface{}, bool)

func (*PatriciaTree) Insert

func (pt *PatriciaTree) Insert(key []byte, value interface{})

Jump to

Keyboard shortcuts

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