codec

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagEnd byte = iota
	TagByte
	TagShort
	TagInt
	TagLong
	TagFloat
	TagDouble
	TagByteArray
	TagString
	TagList
	TagCompound
	TagIntArray
	TagLongArray
)

thanks github.com/Tnze/go-mc

Variables

This section is empty.

Functions

This section is empty.

Types

type Byte

type Byte int8

func (*Byte) Decode

func (b *Byte) Decode(r io.Reader) (err error)

func (*Byte) Encode

func (b *Byte) Encode(w io.Writer) (err error)

type ByteArray

type ByteArray []byte

func (*ByteArray) Decode

func (b *ByteArray) Decode(r io.Reader) (err error)

func (*ByteArray) Encode

func (b *ByteArray) Encode(w io.Writer) (err error)

type Compound

type Compound map[string]Tag

func (*Compound) Decode

func (c *Compound) Decode(r io.Reader) (err error)

func (*Compound) Encode

func (c *Compound) Encode(w io.Writer) (err error)

func (*Compound) Init

func (c *Compound) Init()

type Double

type Double float64

func (*Double) Decode

func (b *Double) Decode(r io.Reader) (err error)

func (*Double) Encode

func (b *Double) Encode(w io.Writer) (err error)

type Float

type Float float32

func (*Float) Decode

func (b *Float) Decode(r io.Reader) (err error)

func (*Float) Encode

func (b *Float) Encode(w io.Writer) (err error)

type Int

type Int int32

func (*Int) Decode

func (b *Int) Decode(r io.Reader) (err error)

func (*Int) Encode

func (b *Int) Encode(w io.Writer) (err error)

type IntArray

type IntArray []int32

func (*IntArray) Decode

func (b *IntArray) Decode(r io.Reader) (err error)

func (*IntArray) Encode

func (b *IntArray) Encode(w io.Writer) (err error)

type List

type List []Tag

func (*List) Decode

func (l *List) Decode(r io.Reader) (err error)

func (*List) Encode

func (l *List) Encode(w io.Writer) (err error)

type Long

type Long int64

func (*Long) Decode

func (b *Long) Decode(r io.Reader) (err error)

func (*Long) Encode

func (b *Long) Encode(w io.Writer) (err error)

type LongArray

type LongArray []int64

func (*LongArray) Decode

func (b *LongArray) Decode(r io.Reader) (err error)

func (*LongArray) Encode

func (b *LongArray) Encode(w io.Writer) (err error)

type Short

type Short int16

func (*Short) Decode

func (b *Short) Decode(r io.Reader) (err error)

func (*Short) Encode

func (b *Short) Encode(w io.Writer) (err error)

type String

type String string

func (*String) Decode

func (s *String) Decode(r io.Reader) (err error)

func (*String) Encode

func (s *String) Encode(w io.Writer) (err error)

type Tag

type Tag interface {
	Encode(w io.Writer) error
	Decode(r io.Reader) error
}

func ParseTag

func ParseTag(id byte) (t Tag)

Jump to

Keyboard shortcuts

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