bele

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 3 Imported by: 75

Documentation

Overview

Package bele 提供了大小端的转换操作

be是big endian的缩写,即大端 le是little endian的缩写,即小端

assume local is `le`

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BEFloat64

func BEFloat64(p []byte) (ret float64)

func BEPutUint24

func BEPutUint24(out []byte, in uint32)

func BEPutUint32

func BEPutUint32(out []byte, in uint32)

func BEUint16

func BEUint16(p []byte) uint16

func BEUint24

func BEUint24(p []byte) uint32

func BEUint32

func BEUint32(p []byte) (ret uint32)

func BEUint64 added in v0.9.0

func BEUint64(p []byte) (ret uint64)

func LEPutUint32

func LEPutUint32(out []byte, in uint32)

func LEUint32

func LEUint32(p []byte) (ret uint32)

func ReadBEUint16 added in v0.9.0

func ReadBEUint16(r io.Reader) (uint16, error)

func ReadBEUint24 added in v0.9.0

func ReadBEUint24(r io.Reader) (uint32, error)

func ReadBEUint32 added in v0.9.0

func ReadBEUint32(r io.Reader) (uint32, error)

func ReadBEUint64 added in v0.9.0

func ReadBEUint64(r io.Reader) (uint64, error)

func ReadBytes added in v0.9.0

func ReadBytes(r io.Reader, n int) ([]byte, error)

func ReadLEUint32 added in v0.9.0

func ReadLEUint32(r io.Reader) (uint32, error)

func ReadString added in v0.9.0

func ReadString(r io.Reader, n int) (string, error)

func ReadUint8 added in v0.9.0

func ReadUint8(r io.Reader) (uint8, error)

func WriteBE

func WriteBE(writer io.Writer, in interface{}) error

func WriteBEUint24

func WriteBEUint24(writer io.Writer, in uint32) error

func WriteLE

func WriteLE(writer io.Writer, in interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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