getEncodedSize
Gets the encoded size of a given value in bytes using the provided encoder.
Type Parameters
| Type Parameter | Description |
|---|---|
TFrom | The type of the value to encode. |
Parameters
| Parameter | Type | Description |
|---|---|---|
value | TFrom | The value to be encoded. |
encoder | | { fixedSize: number; } | { getSizeFromValue: (value) => number; } | The encoder used to determine the encoded size. |
Returns
number
The size of the encoded value in bytes.