Class TlSerializationCounter
Constructors
Properties
Methods
boolean
- boolean(): void
Returns void
bytes
- bytes(val): 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): void
Returns void
raw
- raw(val): void
Returns void
string
- string(val): void
Returns void
vector
- vector(fn, items): void
Parameters
- fn: ((item: unknown) => void)
- items: unknown[]
Returns void
Static
countBytesOverhead
- countBytesOverhead(size): number
Returns number
Static
countNeededBytes
- countNeededBytes(objectMap, obj): 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.