[#ReadCompactSize] = ReadCompactSize :mrdocs: Decode a CompactSize‐encoded variable‐length integer. == Synopsis Declared in `<serialize.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename Stream> uint64_t ReadCompactSize( Stream& is, bool range_check = true); ---- == Description As these are primarily used to encode the size of vector‐like serializations, by default a range check is performed. When used as a generic number encoding, range_check should be set to false. == Return Value The decoded integer value. == Parameters [cols="1,4"] |=== | Name| Description | *is* | The stream to read the CompactSize‐encoded value from. | *range_check* | Whether to reject values larger than MAX_SIZE. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#