Documentation ¶
Overview ¶
Package binary 数据处理
Index ¶
- func BytesToString(b []byte) string
- func GBK2UTF8(s []byte) ([]byte, error)
- func NewWriterF(f func(writer *Writer)) []byte
- func OpenWriterF(f func(*Writer)) (b []byte, cl func())
- func PutWriter(w *Writer)
- func StringToBytes(s string) (b []byte)
- func UTF82GBK(s []byte) ([]byte, error)
- type Writer
- func (w *Writer) Bytes() []byte
- func (w *Writer) FillUInt16() (pos int)
- func (w *Writer) FillUInt32() (pos int)
- func (w *Writer) Grow(n int)
- func (w *Writer) Len() int
- func (w *Writer) Reset()
- func (w *Writer) String() string
- func (w *Writer) Write(b []byte) (n int, err error)
- func (w *Writer) WriteBool(b bool)
- func (w *Writer) WriteByte(b byte) error
- func (w *Writer) WriteHex(h string)
- func (w *Writer) WriteString(v string)
- func (w *Writer) WriteUInt16(v uint16)
- func (w *Writer) WriteUInt16At(pos int, v uint16)
- func (w *Writer) WriteUInt16LE(v uint16)
- func (w *Writer) WriteUInt32(v uint32)
- func (w *Writer) WriteUInt32At(pos int, v uint32)
- func (w *Writer) WriteUInt32LE(v uint32)
- func (w *Writer) WriteUInt64(v uint64)
- func (w *Writer) WriteUInt64LE(v uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToString ¶
BytesToString 没有内存开销的转换
github.com/wdvxdr1123/ZeroBot/utils/helper.BytesToString
func OpenWriterF ¶
OpenWriterF must call func cl to close
func StringToBytes ¶
StringToBytes 没有内存开销的转换
github.com/wdvxdr1123/ZeroBot/utils/helper.StringToBytes
Types ¶
Click to show internal directories.
Click to hide internal directories.