bytes

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Byte2Int64

func Byte2Int64(data []byte) int64

Byte2Int64 byte array to int64 value using big order

func Byte2UInt16

func Byte2UInt16(data []byte) uint16

Byte2UInt16 byte array to uint16 value using big order

func Byte2UInt32

func Byte2UInt32(data []byte) uint32

Byte2UInt32 byte array to uint32 value using big order

func Byte2UInt64

func Byte2UInt64(data []byte) uint64

Byte2UInt64 byte array to int64 value using big order

func Int2Bytes

func Int2Bytes(v int) []byte

Int2Bytes int value to bytes array using big order

func Int2BytesTo

func Int2BytesTo(v int, ret []byte)

Int2BytesTo int value to bytes array using big order

func Int64ToBytes

func Int64ToBytes(v int64) []byte

Int64ToBytes int64 value to bytes array using big order

func Int64ToBytesTo

func Int64ToBytesTo(v int64, ret []byte)

Int64ToBytesTo int64 value to bytes array using big order

func Read1String16

func Read1String16(buf *ByteBuffer) string

func ReadByte

func ReadByte(buf *ByteBuffer) byte

func ReadBytes

func ReadBytes(n int, buf *ByteBuffer) []byte

func ReadString16Length

func ReadString16Length(buf *ByteBuffer) string

func ReadString32

func ReadString32(buf *ByteBuffer) string

func ReadString32Length

func ReadString32Length(buf *ByteBuffer) string

func ReadString64

func ReadString64(buf *ByteBuffer) string

func ReadString64Length

func ReadString64Length(buf *ByteBuffer) string

func ReadString8

func ReadString8(buf *ByteBuffer) string

func ReadString8Length

func ReadString8Length(buf *ByteBuffer) string

func ReadUInt16

func ReadUInt16(buf *ByteBuffer) uint16

func ReadUInt32

func ReadUInt32(buf *ByteBuffer) uint32

func ReadUInt64

func ReadUInt64(buf *ByteBuffer) uint64

func ReadUint8

func ReadUint8(buf *ByteBuffer) uint8

func UInt16ToBytes

func UInt16ToBytes(v uint16) []byte

UInt16ToBytes uint16 value to bytes array using big order

func UInt32ToBytes

func UInt32ToBytes(v uint32) []byte

UInt32ToBytes uint32 value to bytes array using big order

func UInt64ToBytes

func UInt64ToBytes(v uint64) []byte

UInt16ToBytes uint16 value to bytes array using big order

func Uint16ToBytesTo

func Uint16ToBytesTo(v uint16, ret []byte)

Uint16ToBytesTo uint16 value to bytes array using big order

func Uint32ToBytesTo

func Uint32ToBytesTo(v uint32, ret []byte)

Uint32ToBytesTo uint32 value to bytes array using big order

func Uint64ToBytesTo

func Uint64ToBytesTo(v uint64, ret []byte)

Uint64ToBytesTo uint64 value to bytes array using big order

func WriteString16Length

func WriteString16Length(value string, buf *ByteBuffer)

func WriteString32Length

func WriteString32Length(value string, buf *ByteBuffer)

func WriteString64Length

func WriteString64Length(value string, buf *ByteBuffer)

func WriteString8Length

func WriteString8Length(value string, buf *ByteBuffer)

Types

type ByteBuffer

type ByteBuffer struct {
	// contains filtered or unexported fields
}

func NewByteBuffer

func NewByteBuffer(buf []byte) *ByteBuffer

func (*ByteBuffer) Bytes

func (b *ByteBuffer) Bytes() []byte

func (*ByteBuffer) Read

func (b *ByteBuffer) Read(p []byte) (n int, err error)

func (*ByteBuffer) ReadByte

func (b *ByteBuffer) ReadByte() (byte, error)

func (*ByteBuffer) ReadInt64

func (b *ByteBuffer) ReadInt64() (int64, error)

func (*ByteBuffer) ReadUint16

func (b *ByteBuffer) ReadUint16() (uint16, error)

func (*ByteBuffer) ReadUint32

func (b *ByteBuffer) ReadUint32() (uint32, error)

func (*ByteBuffer) ReadUint64

func (b *ByteBuffer) ReadUint64() (uint64, error)

func (*ByteBuffer) Write

func (b *ByteBuffer) Write(p []byte) (n int, err error)

func (*ByteBuffer) WriteByte

func (b *ByteBuffer) WriteByte(p byte) error

func (*ByteBuffer) WriteInt64

func (b *ByteBuffer) WriteInt64(p int64) (n int, err error)

func (*ByteBuffer) WriteString

func (b *ByteBuffer) WriteString(str string) (n int, err error)

func (*ByteBuffer) WriteUint16

func (b *ByteBuffer) WriteUint16(p uint16) (n int, err error)

func (*ByteBuffer) WriteUint32

func (b *ByteBuffer) WriteUint32(p uint32) (n int, err error)

func (*ByteBuffer) WriteUint64

func (b *ByteBuffer) WriteUint64(p uint64) (n int, err error)

Jump to

Keyboard shortcuts

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