Stream‐like object that only records how many bytes a serialization would write.
Synopsis
Declared in <serialize.h>
class SizeComputer;
Member Functions
Name |
Description |
|
Construct a size computer with a zero byte count. |
Pretend this many bytes are written, without specifying them. |
|
Return the total number of bytes recorded so far. |
|
Add the size of a byte span to the running count. |
|
Add the serialized size of an object to the running count. |
Protected Data Members
Name |
Description |
Running count of bytes that would be written. |
Non-Member Functions
Name |
Description |
Account for a CompactSize encoding when computing a serialized size. |
|
Account for a VarInt encoding when computing a serialized size. |
Created with MrDocs