incenc

package module
v0.0.0-...-0d92902 Latest Latest
Warning

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

Go to latest
Published: May 5, 2018 License: Apache-2.0 Imports: 2 Imported by: 3 modules, 3 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

View Source
var Error = errs.Class("incenc")

Error wraps all of the returned errors.

Functions

This section is empty.

Types

type Reader

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

Reader decodes incremental encoded things.

func NewReaderWith

func NewReaderWith(scratch []byte) Reader

NewReaderWith constructs a reader using the provided scratch space.

func (*Reader) Next

func (r *Reader) Next(in []byte) (out, value []byte, err error)

Next consumes the next value out of in, returns it as out, and the value as value. Value is only valid until the next call to Next.

func (*Reader) Reset

func (r *Reader) Reset()

Reset clears the state of the Reader.

type Writer

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

Writer encodes incremental encoding things.

func (*Writer) Append

func (w *Writer) Append(buf []byte, value string) ([]byte, error)

Append appends the value to the buf using the last value as state for reducing the amount of data needed to be written.

func (*Writer) AppendBytes

func (w *Writer) AppendBytes(buf []byte, value []byte) ([]byte, error)

AppendBytes is like Append except the value is a []byte instead of a string.

func (*Writer) Copy

func (w *Writer) Copy() *Writer

Copy returns a safe copy of the current Writer with state preserved.

func (*Writer) Reset

func (w *Writer) Reset()

Reset clears the state of the Writer.

Jump to

Keyboard shortcuts

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