bele

package
v0.0.0-...-931a278 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: MIT Imports: 3 Imported by: 11

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 BePutUint16

func BePutUint16(out []byte, in uint16)

func BePutUint24

func BePutUint24(out []byte, in uint32)

func BePutUint32

func BePutUint32(out []byte, in uint32)

func BePutUint64

func BePutUint64(out []byte, in uint64)

func BeUint16

func BeUint16(p []byte) uint16

func BeUint24

func BeUint24(p []byte) uint32

func BeUint32

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

func BeUint64

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

func LePutUint32

func LePutUint32(out []byte, in uint32)

func LeUint32

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

func ReadBeUint16

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

func ReadBeUint24

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

func ReadBeUint32

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

func ReadBeUint64

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

func ReadBytes

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

func ReadLeUint32

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

func ReadString

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

func ReadUint8

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