[#GetSizeOfCompactSize]
= GetSizeOfCompactSize
:mrdocs:

Compact Size size &lt; 253 &hyphen;&hyphen; 1 byte size &lt;&equals; USHRT&lowbar;MAX &hyphen;&hyphen; 3 bytes (253 &plus; 2 bytes) size &lt;&equals; UINT&lowbar;MAX &hyphen;&hyphen; 5 bytes (254 &plus; 4 bytes) size &gt; UINT&lowbar;MAX &hyphen;&hyphen; 9 bytes (255 &plus; 8 bytes)

== Synopsis

Declared in `&lt;serialize&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
unsigned int
GetSizeOfCompactSize(uint64&lowbar;t nSize);
----

== Return Value

The number of bytes its CompactSize encoding occupies&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *nSize*
| The value that would be encoded as a CompactSize&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
