binary

package
v0.0.0-...-22830a4 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrBadMagic stok.Error = "Bad magic header"
)

Variables

This section is empty.

Functions

func AppendInt64

func AppendInt64(buf []byte, i int64) []byte

func AppendMagic

func AppendMagic(buf []byte, magic [8]byte) []byte

func CheckMagic

func CheckMagic(buf []byte, magic [8]byte) error

func DecodeInt64

func DecodeInt64(buf []byte, d *int64) []byte

func DecodeMagic

func DecodeMagic(buf []byte, magic [8]byte) ([]byte, error)

func ToBuffer

func ToBuffer(a Appender, buf *buffer.Buffer)

Types

type Appender

type Appender interface {
	Append(b []byte) []byte
}

type Decoder

type Decoder interface {
	Decode(b []byte) ([]byte, error)
}

Jump to

Keyboard shortcuts

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