codec

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: MIT Imports: 4 Imported by: 33 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

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

func NewCl100kBase

func NewCl100kBase() *Codec

func NewO200kBase added in v0.2.0

func NewO200kBase() *Codec

func NewP50kBase

func NewP50kBase() *Codec

func NewP50kEdit

func NewP50kEdit() *Codec

func NewR50kBase

func NewR50kBase() *Codec

func (*Codec) Count added in v0.5.0

func (c *Codec) Count(input string) (int, error)

Count returns the number of tokens in the input string.

func (*Codec) Decode

func (c *Codec) Decode(tokens []uint) (string, error)

func (*Codec) Encode

func (c *Codec) Encode(input string) ([]uint, []string, error)

Encode returns the token IDs and tokens for the input string.

func (*Codec) GetName

func (c *Codec) GetName() string

Jump to

Keyboard shortcuts

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