# Functions
Encode create a packet.Packet from the raw bytes slice and then encode to network bytes slice Protocol refs: https://github.com/NetEase/pomelo/wiki/Communication-Protocol
-<type>-|--------<length>--------|-<data>- --------|------------------------|-------- 1 byte packet type, 3 bytes packet data length(big end), and data segment.
NewDecoder returns a new decoder that used for decode network bytes slice.
# Variables
ErrPacketSizeExcced is the error used for encode/decode.