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
Parameters
reader: Bytes
eof: boolean
Returns null|Uint8Array
encode
encode(frame:Uint8Array,into:ISyncWritable):void
Encode a frame into a writable stream
Parameters
frame: Uint8Array
into: ISyncWritable
Returns void
reset
reset():void
Reset the encoder, should it have any internal state
Returns void
tag
tag():Uint8Array
Initial tag of the codec. Will be sent immediately once connected.
Intermediate packet codec. See https://core.telegram.org/mtproto/mtproto-transports#intermediate