bytes

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Size = math.MaxUint8 + 1

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func NewBuilder

func NewBuilder() *Builder

func (*Builder) Add

func (x *Builder) Add(bs []byte)

func (*Builder) Build

func (x *Builder) Build() Dict

type Dict

type Dict []byte

func FromReader

func FromReader(r io.Reader) (Dict, error)

func FromSlice

func FromSlice(xs [][]byte) (*keytree.Tree, Dict, error)

func FromWalker

func FromWalker(w Walker) (*keytree.Tree, Dict, error)

func New

func New(bs []byte) Dict

func (Dict) Code

func (d Dict) Code(b byte) word.Code

func (Dict) MarshalBinary

func (d Dict) MarshalBinary() ([]byte, error)

func (*Dict) ReadFrom

func (d *Dict) ReadFrom(r io.Reader) (int64, error)

func (*Dict) UnmarshalBinary

func (d *Dict) UnmarshalBinary(bs []byte) error

func (Dict) WithNameSpace

func (d Dict) WithNameSpace(ns, key []byte) word.Word

func (Dict) Word

func (d Dict) Word(bs []byte) word.Word

func (Dict) WriteTo

func (d Dict) WriteTo(w io.Writer) (int64, error)

type Walker

type Walker interface {
	Walk(func([]byte) error) error
}

Jump to

Keyboard shortcuts

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