Stream-like object that only records how many bytes a serialization would write.
Declared in <serialize.h>
class SizeComputer;
| Name | Description |
|---|---|
SizeComputer [constructor] | Construct a size computer with a zero byte count. |
seek | Pretend this many bytes are written, without specifying them. |
size | Return the total number of bytes recorded so far. |
write | Add the size of a byte span to the running count. |
operator<< | Add the serialized size of an object to the running count. |
| Name | Description |
|---|---|
m_size | Running count of bytes that would be written. |
| Name | Description |
|---|---|
WriteCompactSize | Account for a CompactSize encoding when computing a serialized size. |
WriteVarInt | Account for a VarInt encoding when computing a serialized size. |