binpack

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PackStrArr

func PackStrArr(w io.Writer, strs []string) error

func PackUInt

func PackUInt(w io.Writer, ival uint64) error

func PackValue

func PackValue(w io.Writer, barr []byte) error

func UnpackStrArr

func UnpackStrArr(r FullByteReader) ([]string, error)

func UnpackUInt

func UnpackUInt(r io.ByteReader) (uint64, error)

func UnpackUIntAsInt

func UnpackUIntAsInt(r io.ByteReader) (int, error)

func UnpackValue

func UnpackValue(r FullByteReader) ([]byte, error)

Types

type FullByteReader

type FullByteReader interface {
	io.ByteReader
	io.Reader
}

type Unpacker

type Unpacker struct {
	R   FullByteReader
	Err error
}

func MakeUnpacker

func MakeUnpacker(r FullByteReader) *Unpacker

func (*Unpacker) Error

func (u *Unpacker) Error() error

func (*Unpacker) UnpackStrArr

func (u *Unpacker) UnpackStrArr(name string) []string

func (*Unpacker) UnpackUInt

func (u *Unpacker) UnpackUInt(name string) int

func (*Unpacker) UnpackValue

func (u *Unpacker) UnpackValue(name string) []byte

Jump to

Keyboard shortcuts

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