Skip to content

miniproto.tl.codec.encode_string

encode_string(value: str) -> bytes

UTF-8 encode a string as a TL byte string.

Parameters:

  • value (str) – Text to encode.

Returns:

  • bytes – Length-prefixed, padded TL string bytes.