v0.0.0-...-4ee5d08 Latest Latest

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 8 Imported by: 0




This section is empty.


This section is empty.


func IsExists

func IsExists(path string) bool

IsExists ...

func IsInvalid

func IsInvalid(path string) bool

IsInvalid ...

func IsValid

func IsValid(path string) bool

IsValid ...

func LoadJSON

func LoadJSON(path string, lang string) map[string]interface{}

LoadJSON load

func ReadByteArray

func ReadByteArray(path string) []byte

ReadByteArray reads all contents from file this may does not work properly in every platform should embed images into go file

func Write

func Write(ofs *OFS, s string, l int)

Write ...


type IFS

type IFS struct {
	// contains filtered or unexported fields

IFS ...

func NewIFS

func NewIFS(f *os.File) *IFS

NewIFS ... a constructor

func (*IFS) Close

func (i *IFS) Close()

Close ...

func (*IFS) GetBuffer

func (i *IFS) GetBuffer(n int) []byte

GetBuffer ...

func (*IFS) GetLen

func (i *IFS) GetLen() int

GetLen ...

func (*IFS) Seek

func (i *IFS) Seek(n int) error

Seek ...

type OFS

type OFS struct {
	// contains filtered or unexported fields

OFS ...

func Create

func Create(filename string) (*OFS, error)

Create ...

func NewOFS

func NewOFS() *OFS

NewOFS ... a constructor

func (*OFS) Close

func (o *OFS) Close()

Close ...

func (*OFS) Store8

func (o *OFS) Store8(b byte) error

Store8 ...

type Reader

type Reader interface {
	ReadByteSafe() byte
	ReadWordSafe() int
	ReadDWordSafe() int
	ReadVecSafe(length int) []byte
	ReadStringSafe(length int) string
	SkipBytesSafe(length int)

Reader ...

type Serializer

type Serializer struct {
	// contains filtered or unexported fields

Serializer ...

func NewSerializer

func NewSerializer(rawData []byte, rawPos int) *Serializer

NewSerializer ...

func (*Serializer) ReadByteRaw

func (s *Serializer) ReadByteRaw() (byte, error)

ReadByteRaw ...

func (*Serializer) ReadByteSafe

func (s *Serializer) ReadByteSafe() byte

ReadByteSafe ...

func (*Serializer) ReadDWordRaw

func (s *Serializer) ReadDWordRaw() (int, error)

ReadDWordRaw ...

func (*Serializer) ReadDWordSafe

func (s *Serializer) ReadDWordSafe() int

ReadDWordSafe ...

func (*Serializer) ReadStringRaw

func (s *Serializer) ReadStringRaw(length int) (string, error)

ReadStringRaw ...

func (*Serializer) ReadStringSafe

func (s *Serializer) ReadStringSafe(length int) string

ReadStringSafe ...

func (*Serializer) ReadVecRaw

func (s *Serializer) ReadVecRaw(length int) ([]byte, error)

ReadVecRaw ...

func (*Serializer) ReadVecSafe

func (s *Serializer) ReadVecSafe(length int) []byte

ReadVecSafe ...

func (*Serializer) ReadWordRaw

func (s *Serializer) ReadWordRaw() (int, error)

ReadWordRaw ...

func (*Serializer) ReadWordSafe

func (s *Serializer) ReadWordSafe() int

ReadWordSafe ...

func (*Serializer) SetOFS

func (s *Serializer) SetOFS(ofs *OFS)

SetOFS ...

func (*Serializer) SkipBytesRaw

func (s *Serializer) SkipBytesRaw(length int) error

SkipBytesRaw ...

func (*Serializer) SkipBytesSafe

func (s *Serializer) SkipBytesSafe(length int)

SkipBytesSafe ...

func (*Serializer) WriteByte

func (s *Serializer) WriteByte(v byte) error

WriteByte ...

func (*Serializer) WriteByteSafe

func (s *Serializer) WriteByteSafe(v byte)

WriteByteSafe ...

func (*Serializer) WriteDWord

func (s *Serializer) WriteDWord(v int) error

WriteDWord ...

func (*Serializer) WriteDWordSafe

func (s *Serializer) WriteDWordSafe(n int)

WriteDWordSafe ...

func (*Serializer) WriteString

func (s *Serializer) WriteString(str string, length int) error

WriteString ...

func (*Serializer) WriteStringSafe

func (s *Serializer) WriteStringSafe(str string, length int)

WriteStringSafe ...

func (*Serializer) WriteVec

func (s *Serializer) WriteVec(v []byte, startp int, length int) error

WriteVec ...

func (*Serializer) WriteVecSafe

func (s *Serializer) WriteVecSafe(v []byte, startp int, length int)

WriteVecSafe ...

func (*Serializer) WriteWord

func (s *Serializer) WriteWord(v int) error

WriteWord ...

func (*Serializer) WriteWordSafe

func (s *Serializer) WriteWordSafe(n int)

WriteWordSafe ...

func (*Serializer) WriteZeroes

func (s *Serializer) WriteZeroes(startp int, endp int) error

WriteZeroes ...

type Writer

type Writer interface {
	WriteByteSafe(b byte)
	WriteWordSafe(n int)
	WriteDWordSafe(n int)
	WriteStringSafe(s string, length int)
	WriteVecSafe(v []byte, startp int, length int)

Writer ...

Jump to

Keyboard shortcuts

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