core

package
v0.0.0-...-c66e226 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2018 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcDataLength

func CalcDataLength(data Data) (uint16, error)

func ReadByte

func ReadByte(r Reader) byte

func ReadBytes

func ReadBytes(len uint16, r Reader) []byte

func ReadPadding

func ReadPadding(length int, r Reader)

func ReadUInt16BE

func ReadUInt16BE(r Reader) uint16

func ReadUInt16LE

func ReadUInt16LE(r Reader) uint16

func ReadUInt32BE

func ReadUInt32BE(r Reader) uint32

func ReadUInt32LE

func ReadUInt32LE(r Reader) uint32

func ReadUInt8

func ReadUInt8(r Reader) uint8

func WriteByte

func WriteByte(data byte, w Writer)

func WritePadding

func WritePadding(length int, w Writer)

func WriteUInt16BE

func WriteUInt16BE(data uint16, w Writer)

func WriteUInt16LE

func WriteUInt16LE(data uint16, w Writer)

func WriteUInt32BE

func WriteUInt32BE(data uint32, w Writer)

func WriteUInt32LE

func WriteUInt32LE(data uint32, w Writer)

func WriteUInt8

func WriteUInt8(data uint8, w Writer)

Types

type Component

type Component struct {
	Opt interface{}
}

func NewComponent

func NewComponent(opt interface{}) *Component

func (*Component) Read

func (c *Component) Read(reader Reader) error

func (*Component) Write

func (c *Component) Write(writer Writer) error

type ComponentOption

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

func NewComponentOption

func NewComponentOption(readLength uint16, constant bool, optional bool) *ComponentOption

type Data

type Data interface {
	Write(writer *Writer) error
	Read(reader *Reader) error
}

type IoReader

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

type LimitedReader

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

func (*LimitedReader) Read

func (reader *LimitedReader) Read(buffer []byte) (int, error)

type Readable

type Readable interface {
	Read(r Reader) error
}

type Reader

type Reader interface {
	Read([]byte) (int, error)
}

func NewLimitedReader

func NewLimitedReader(reader Reader, needRead int) Reader

type Writable

type Writable interface {
	Write(w *Writer) error
}

type Writer

type Writer struct {
	bufio.Writer
}

Jump to

Keyboard shortcuts

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