Class TlSerializationCounter
Constructors
Properties
Methods
boolean
- boolean(): void
Returns void
bytes
- bytes(val: Uint8Array): void
Returns void
double
- double(): void
Returns void
float
- float(): void
Returns void
int128
- int128(): void
Returns void
int256
- int256(): void
Returns void
int53
- int53(): void
Returns void
object
- object(obj: { _: string }): void
Returns void
raw
- raw(val: Uint8Array): void
Returns void
string
- string(val: string): void
Returns void
vector
- vector(fn: (item: unknown) => void, items: unknown[]): void
Parameters
- fn: (item: unknown) => void
- items: unknown[]
Returns void
Static
countBytesOverhead
- countBytesOverhead(size: number): number
Returns number
Static
countNeededBytes
- countNeededBytes(objectMap: TlWriterMap, obj: { _: string }): number
Returns number
Counter of the required number of bytes to encode a given object.
Used as a pre-pass before using TlBinaryWriter to avoid unnecessary allocations.