2024-02-23 00:24:21 +03:00
|
|
|
/**
|
|
|
|
* Platform-specific functions used by {@link TlBinaryReader} and {@link TlBinaryWriter}
|
|
|
|
*/
|
|
|
|
export interface ITlPlatform {
|
2024-08-13 04:53:07 +03:00
|
|
|
utf8Encode: (str: string) => Uint8Array
|
|
|
|
utf8Decode: (buf: Uint8Array) => string
|
|
|
|
utf8ByteLength: (str: string) => number
|
2024-02-28 00:33:23 +03:00
|
|
|
|
2024-08-13 04:53:07 +03:00
|
|
|
hexEncode: (buf: Uint8Array) => string
|
|
|
|
hexDecode: (str: string) => Uint8Array
|
2024-02-28 00:33:23 +03:00
|
|
|
|
2024-08-13 04:53:07 +03:00
|
|
|
base64Encode: (buf: Uint8Array, url?: boolean) => string
|
|
|
|
base64Decode: (str: string, url?: boolean) => Uint8Array
|
2024-02-23 00:24:21 +03:00
|
|
|
}
|