jex

package
v0.0.0-...-b05aa3b Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Version = 1

Variables

View Source
var ErrFormat = errors.New("Not a Jex format")
View Source
var ErrVersion = errors.New("Unsupported Jex version")

Functions

func Marshal

func Marshal(w io.Writer, in interface{}, zip bool) error

func MarshalNaked

func MarshalNaked(w io.Writer, in interface{}, name string) error

MarshalNaked marshal naked data, name can be empty

func ReadHeader

func ReadHeader(r io.Reader) (ver int, zip bool, err error)

ReadHeader 读文件头

func Unmarshal

func Unmarshal(r io.Reader, out interface{}) error

Unmarshal 读一个结构

func UnmarshalNaked

func UnmarshalNaked(r io.Reader, out interface{}) (name string, err error)

UnmarshalNaked 读裸数据

func WriteHeader

func WriteHeader(w io.Writer, zip bool) error

WriteHeader write Jex header

Types

type InvalidUnmarshalError

type InvalidUnmarshalError struct {
	Type reflect.Type
}

InvalidUnmarshalError 是解码错误

func (*InvalidUnmarshalError) Error

func (e *InvalidUnmarshalError) Error() string

Jump to

Keyboard shortcuts

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