Documentation ¶
Index ¶
- func AppendUUID(dst []byte, uuid []byte) []byte
- func CalculateImageResourceId(md5 []byte) string
- func GZipCompress(data []byte) []byte
- func GZipUncompress(src []byte) []byte
- func GenUUID(uuid []byte) []byte
- func NewWriterF(f func(writer *Writer)) []byte
- func OpenWriterF(f func(*Writer)) (b []byte, cl func())
- func PutWriter(w *Writer)
- func ReleaseGzipWriter(w *GzipWriter)
- func ToBytes(i any) []byte
- func UInt32ToIPV4Address(i uint32) string
- func ZlibCompress(data []byte) []byte
- func ZlibUncompress(src []byte) []byte
- type GzipWriter
- type NetworkReader
- type Reader
- func (r *Reader) Index() int64
- func (r *Reader) Len() int
- func (r *Reader) ReadAvailable() []byte
- func (r *Reader) ReadByte() byte
- func (r *Reader) ReadBytes(len int) []byte
- func (r *Reader) ReadBytesShort() []byte
- func (r *Reader) ReadInt32() int32
- func (r *Reader) ReadInt32Bytes() []byte
- func (r *Reader) ReadInt64() int64
- func (r *Reader) ReadString() string
- func (r *Reader) ReadStringLimit(limit int) string
- func (r *Reader) ReadStringShort() string
- func (r *Reader) ReadTlvMap(tagSize int) (m TlvMap)
- func (r *Reader) ReadUInt16() uint16
- type TEA
- type TlvMap
- type Writer
- func (w *Writer) Bytes() []byte
- func (w *Writer) EncryptAndWrite(key []byte, data []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) Write(b []byte)
- func (w *Writer) WriteBool(b bool)
- func (w *Writer) WriteByte(b byte)
- func (w *Writer) WriteBytesShort(data []byte)
- func (w *Writer) WriteHex(h string)
- func (w *Writer) WriteIntLvPacket(offset int, f func(*Writer))
- func (w *Writer) WriteString(v string)
- func (w *Writer) WriteStringShort(v string)
- func (w *Writer) WriteTlvLimitedSize(data []byte, limit int)
- func (w *Writer) WriteUInt16(v uint16)
- func (w *Writer) WriteUInt16At(pos int, v uint16)
- func (w *Writer) WriteUInt32(v uint32)
- func (w *Writer) WriteUInt32At(pos int, v uint32)
- func (w *Writer) WriteUInt64(v uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendUUID ¶
func GZipCompress ¶
func GZipUncompress ¶
func NewWriterF ¶
func OpenWriterF ¶
OpenWriterF must call func cl to close
func ReleaseGzipWriter ¶
func ReleaseGzipWriter(w *GzipWriter)
func UInt32ToIPV4Address ¶
func ZlibCompress ¶
func ZlibUncompress ¶
Types ¶
type GzipWriter ¶
type GzipWriter struct {
// contains filtered or unexported fields
}
func AcquireGzipWriter ¶
func AcquireGzipWriter() *GzipWriter
func (*GzipWriter) Bytes ¶
func (w *GzipWriter) Bytes() []byte
func (*GzipWriter) Close ¶
func (w *GzipWriter) Close() error
type NetworkReader ¶
type NetworkReader struct {
// contains filtered or unexported fields
}
func NewNetworkReader ¶
func NewNetworkReader(conn net.Conn) *NetworkReader
func (*NetworkReader) ReadByte ¶
func (r *NetworkReader) ReadByte() (byte, error)
func (*NetworkReader) ReadInt32 ¶
func (r *NetworkReader) ReadInt32() (int32, error)
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) ReadAvailable ¶
func (*Reader) ReadBytesShort ¶
func (*Reader) ReadInt32Bytes ¶
func (*Reader) ReadString ¶
func (*Reader) ReadStringLimit ¶
func (*Reader) ReadStringShort ¶
func (*Reader) ReadTlvMap ¶
func (*Reader) ReadUInt16 ¶
type Writer ¶
Writer 写入
func (*Writer) EncryptAndWrite ¶
func (*Writer) FillUInt16 ¶
func (*Writer) FillUInt32 ¶
func (*Writer) WriteBytesShort ¶
func (*Writer) WriteIntLvPacket ¶
func (*Writer) WriteString ¶
func (*Writer) WriteStringShort ¶
func (*Writer) WriteTlvLimitedSize ¶
func (*Writer) WriteUInt16 ¶
func (*Writer) WriteUInt16At ¶
func (*Writer) WriteUInt32 ¶
func (*Writer) WriteUInt32At ¶
func (*Writer) WriteUInt64 ¶
Click to show internal directories.
Click to hide internal directories.