Internal array of slot names for the object.
Name of the class.
Type of the class.
Reference to the constructor of the current class (late static binding).
Unique identifier for the constructor.
Identifier for the parent class (if any).
Reads data from the provided BytesIO instance and processes it using the associated class's read method.
The BytesIO instance containing the data to be read.
Additional arguments to be passed to the class's read method.
A promise that resolves with the result of the read operation.
Serializes the provided arguments using the associated class's write method.
The arguments to be serialized.
The resulting Buffer after serialization.
StaticreadReads a variable-length buffer from the provided BytesIO stream.
The method first reads a length prefix from the stream:
After reading the buffer, it reads additional bytes to align the stream position to a 4-byte boundary.
The BytesIO stream to read from.
Additional arguments (unused).
A Promise that resolves to the read Buffer.
StaticwriteSerializes a Buffer value into a custom binary format with length-prefix encoding and padding.
The padding ensures the total length (including prefix and data) is a multiple of 4 bytes.
The Buffer to serialize.
A Buffer containing the serialized data with length prefix and padding.
Bytes is a class representing a sequence of bytes in the Telegram MTProto protocol. It provides methods to read and write these bytes in a specified format.