Documentation ¶
Index ¶
- func Byte2Int64(data []byte) int64
- func Byte2UInt16(data []byte) uint16
- func Byte2UInt32(data []byte) uint32
- func Byte2UInt64(data []byte) uint64
- func Int2Bytes(v int) []byte
- func Int2BytesTo(v int, ret []byte)
- func Int64ToBytes(v int64) []byte
- func Int64ToBytesTo(v int64, ret []byte)
- func Read1String16(buf *ByteBuffer) string
- func ReadByte(buf *ByteBuffer) byte
- func ReadBytes(n int, buf *ByteBuffer) []byte
- func ReadString16Length(buf *ByteBuffer) string
- func ReadString32(buf *ByteBuffer) string
- func ReadString32Length(buf *ByteBuffer) string
- func ReadString64(buf *ByteBuffer) string
- func ReadString64Length(buf *ByteBuffer) string
- func ReadString8(buf *ByteBuffer) string
- func ReadString8Length(buf *ByteBuffer) string
- func ReadUInt16(buf *ByteBuffer) uint16
- func ReadUInt32(buf *ByteBuffer) uint32
- func ReadUInt64(buf *ByteBuffer) uint64
- func ReadUint8(buf *ByteBuffer) uint8
- func UInt16ToBytes(v uint16) []byte
- func UInt32ToBytes(v uint32) []byte
- func UInt64ToBytes(v uint64) []byte
- func Uint16ToBytesTo(v uint16, ret []byte)
- func Uint32ToBytesTo(v uint32, ret []byte)
- func Uint64ToBytesTo(v uint64, ret []byte)
- func WriteString16Length(value string, buf *ByteBuffer)
- func WriteString32Length(value string, buf *ByteBuffer)
- func WriteString64Length(value string, buf *ByteBuffer)
- func WriteString8Length(value string, buf *ByteBuffer)
- type ByteBuffer
- func (b *ByteBuffer) Bytes() []byte
- func (b *ByteBuffer) Read(p []byte) (n int, err error)
- func (b *ByteBuffer) ReadByte() (byte, error)
- func (b *ByteBuffer) ReadInt64() (int64, error)
- func (b *ByteBuffer) ReadUint16() (uint16, error)
- func (b *ByteBuffer) ReadUint32() (uint32, error)
- func (b *ByteBuffer) ReadUint64() (uint64, error)
- func (b *ByteBuffer) Write(p []byte) (n int, err error)
- func (b *ByteBuffer) WriteByte(p byte) error
- func (b *ByteBuffer) WriteInt64(p int64) (n int, err error)
- func (b *ByteBuffer) WriteString(str string) (n int, err error)
- func (b *ByteBuffer) WriteUint16(p uint16) (n int, err error)
- func (b *ByteBuffer) WriteUint32(p uint32) (n int, err error)
- func (b *ByteBuffer) WriteUint64(p uint64) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Byte2Int64 ¶
Byte2Int64 byte array to int64 value using big order
func Byte2UInt16 ¶
Byte2UInt16 byte array to uint16 value using big order
func Byte2UInt32 ¶
Byte2UInt32 byte array to uint32 value using big order
func Byte2UInt64 ¶
Byte2UInt64 byte array to int64 value using big order
func Int2BytesTo ¶
Int2BytesTo int value to bytes array using big order
func Int64ToBytes ¶
Int64ToBytes int64 value to bytes array using big order
func Int64ToBytesTo ¶
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 ¶
UInt16ToBytes uint16 value to bytes array using big order
func UInt32ToBytes ¶
UInt32ToBytes uint32 value to bytes array using big order
func UInt64ToBytes ¶
UInt16ToBytes uint16 value to bytes array using big order
func Uint16ToBytesTo ¶
Uint16ToBytesTo uint16 value to bytes array using big order
func Uint32ToBytesTo ¶
Uint32ToBytesTo uint32 value to bytes array using big order
func Uint64ToBytesTo ¶
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) 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) 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)