Decode a frame from a buffer
Important implementation notice: When returning byte arrays, make sure that the returned array is not a view into the original buffer, as the underlying buffer may get invalidated
Encode a frame into a writable stream
Reset the encoder, should it have any internal state
Initial tag of the codec. Will be sent immediately once connected.
Intermediate packet codec. See https://core.telegram.org/mtproto/mtproto-transports#intermediate