![]() |
Open 3D Engine GridMate API Reference
2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <CompressionMarshal.h>
Public Member Functions | |
AZ_TYPE_INFO (VlqU32Marshaler, "{BD9A38BB-713E-44FD-A517-8B3B782BDAAF}") | |
void | Marshal (WriteBuffer &wb, AZ::u32 v) |
void | Unmarshal (AZ::u32 &v, ReadBuffer &rb) |
Quantizes an AZ::u32 into 1, 2, 3, 4, or 5 bytes based on highest bit usage. The format of the serialized value is a sequence of 1's specifying the number of bytes trailing the initial byte, followed by a 0, followed by the bits that make up the actual value. For example, the number 98 decimal (one byte) will be encoded as 0|1100010, and the largest number representable by a u32, 4294967295, will be represented as 11110|111 11111111 11111111 11111111 111111000.
These are the resulting encoding ranges: Bytes Available Bits Range 1 7 127 2 14 ~16K 3 21 ~2M 4 28 ~256M 5 32 ~4B