bele

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 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 added in v0.19.0

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

func BePutUint16 added in v0.19.0

func BePutUint16(out []byte, in uint16)

func BePutUint24 added in v0.19.0

func BePutUint24(out []byte, in uint32)

func BePutUint32 added in v0.19.0

func BePutUint32(out []byte, in uint32)

func BePutUint64 added in v0.19.0

func BePutUint64(out []byte, in uint64)

func BeUint16 added in v0.19.0

func BeUint16(p []byte) uint16

func BeUint24 added in v0.19.0

func BeUint24(p []byte) uint32

func BeUint32 added in v0.19.0

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

func BeUint64 added in v0.19.0

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

func LePutUint32 added in v0.19.0

func LePutUint32(out []byte, in uint32)

func LeUint32 added in v0.19.0

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

func ReadBeUint16 added in v0.19.0

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

func ReadBeUint24 added in v0.19.0

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

func ReadBeUint32 added in v0.19.0

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

func ReadBeUint64 added in v0.19.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.19.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 added in v0.19.0

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

func WriteBeUint24 added in v0.19.0

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

func WriteLe added in v0.19.0

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