Versions in this module Expand all Collapse all v1 v1.1.0 Jan 14, 2021 v1.0.2 Jan 14, 2021 Changes in this version + func CalculateImageResourceId(md5 []byte) string + func GZipCompress(data []byte) []byte + func GZipUncompress(src []byte) []byte + func GenUUID(uuid []byte) string + func NewWriterF(f func(writer *Writer)) []byte + func ToBytes(i interface{}) []byte + func ToChunkedBytesF(b []byte, size int, f func([]byte)) + func ToIPV4Address(arr []byte) string + func UInt32ToIPV4Address(i uint32) string + func ZlibCompress(data []byte) []byte + func ZlibUncompress(src []byte) []byte + type NetworkReader struct + func NewNetworkReader(conn net.Conn) *NetworkReader + func (r *NetworkReader) ReadByte() (byte, error) + func (r *NetworkReader) ReadBytes(len int) ([]byte, error) + func (r *NetworkReader) ReadInt32() (int32, error) + type Reader struct + func NewReader(data []byte) *Reader + 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) 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 struct + func NewTeaCipher(key []byte) *TEA + func (t *TEA) Decrypt(data []byte) []byte + func (t *TEA) Encrypt(src []byte) (dst []byte) + type TlvMap map[uint16][]byte + func (tlv TlvMap) Exists(key uint16) bool + type Writer struct + func NewWriter() *Writer + func (w *Writer) Bytes() []byte + func (w *Writer) EncryptAndWrite(key []byte, data []byte) + func (w *Writer) Write(b []byte) + func (w *Writer) WriteBool(b bool) + func (w *Writer) WriteByte(b byte) + func (w *Writer) WriteIntLvPacket(offset int, f func(writer *Writer)) + func (w *Writer) WriteString(v string) + func (w *Writer) WriteStringShort(v string) + func (w *Writer) WriteTlv(data []byte) + func (w *Writer) WriteTlvLimitedSize(data []byte, limit int) + func (w *Writer) WriteUInt16(v uint16) + func (w *Writer) WriteUInt32(v uint32) + func (w *Writer) WriteUInt64(v uint64) + func (w *Writer) WriteUniPacket(commandName string, sessionId, extraData, body []byte)