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.
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
GridMate::VlqU64Marshaler Class Reference

#include <CompressionMarshal.h>

Classes

struct  GetMask
 

Public Member Functions

 AZ_TYPE_INFO (VlqU64Marshaler, "{F1141AF7-499D-4A75-A35E-8325B2EB182B}")
 
void Marshal (WriteBuffer &wb, AZ::u64 v)
 
void Unmarshal (AZ::u64 &v, ReadBuffer &rb)
 

Static Public Member Functions

template<AZ::u32 after_bits>
static AZ::u8 GetByteAfterBits (AZ::u64 v)
 

Static Public Attributes

static const AZ::u32 MaxEncodingBytes = 9
 

Detailed Description

Quantizes an AZ::u64 into 1, 2, 3, 4, 5, 7, 8, or 9 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

In the case of 9 byte encoding, the first byte is 0xFF and indicates 9 byte encoding (without a zero to follow for optimization based on assumption that 64bit is the largest integer supported) where as in 8 byte encoding, the first byte is 0xFE.


The documentation for this class was generated from the following file: