Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Serialization
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Serialization/CompactBinarySerialization.h |
| Include | #include "Serialization/CompactBinarySerialization.h" |
| Source | /Engine/Source/Runtime/Core/Private/Serialization/CompactBinarySerialization.cpp |
uint64 MeasureCompactBinary
(
FMemoryView View,
ECbFieldType Type
)
Remarks
Determine the size in bytes of the compact binary field at the start of the view.
This may be called on an incomplete or invalid field, in which case the returned size is zero. A size can always be extracted from a valid field with no name if a view of at least the first 10 bytes is provided, regardless of field size. For fields with names, the size of view needed to calculate a size is at most 10 + MaxNameLen + MeasureVarUInt(MaxNameLen).
This function can be used when streaming a field, for example, to determine the size of buffer to fill before attempting to construct a field from it.
Parameters
| Name | Description |
|---|---|
| View | A memory view that may contain the start of a field. |
| Type | HasFieldType means that View contains the type. Otherwise, use the given type. |