godec

package module
v0.0.0-...-01570cd Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2014 License: GPL-2.0 Imports: 10 Imported by: 0

README

godec

Like encoding/gob, but hopefully efficient even when encoding to blobs instead of streams.

Note: I am myself using github.com/vmihailenco/msgpack right now, since it is even faster and seems to do basically the same thing.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Infof

func Infof(f string, i ...interface{})

func Marshal

func Marshal(i interface{}) (result []byte, err error)

func SetLogger

func SetLogger(i Infofer)

func Unmarshal

func Unmarshal(b []byte, i interface{}) (err error)

Types

type Decoder

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

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

func (*Decoder) Decode

func (self *Decoder) Decode(i interface{}) (err error)

type Encoder

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

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

func (*Encoder) Encode

func (self *Encoder) Encode(i interface{}) (err error)

type Infofer

type Infofer interface {
	Infof(f string, i ...interface{})
}

type Kind

type Kind uint64

func (Kind) String

func (self Kind) String() string

type Type

type Type struct {
	Base  Kind
	Key   *Type
	Value *Type
}

func (*Type) Equal

func (self *Type) Equal(o *Type) bool

func (Type) String

func (self Type) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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