Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
VarInt.h File Reference
#include "CoreTypes.h"
#include "HAL/PlatformMath.h"
+ Include dependency graph for VarInt.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

FORCEINLINE uint32 MeasureVarUInt (const void *InData)
 
FORCEINLINE uint32 MeasureVarInt (const void *InData)
 
FORCEINLINE uint32 MeasureVarUInt (uint32 InValue)
 
FORCEINLINE uint32 MeasureVarUInt (uint64 InValue)
 
FORCEINLINE uint32 MeasureVarInt (int32 InValue)
 
FORCEINLINE uint32 MeasureVarInt (int64 InValue)
 
FORCEINLINE uint64 ReadVarUInt (const void *InData, uint32 &OutByteCount)
 
FORCEINLINE int64 ReadVarInt (const void *InData, uint32 &OutByteCount)
 
FORCEINLINE uint32 WriteVarUInt (uint32 InValue, void *OutData)
 
FORCEINLINE uint32 WriteVarUInt (uint64 InValue, void *OutData)
 
FORCEINLINE uint32 WriteVarInt (int32 InValue, void *OutData)
 
FORCEINLINE uint32 WriteVarInt (int64 InValue, void *OutData)
 
int64 ReadVarIntFromArchive (FArchive &Ar)
 
void WriteVarIntToArchive (FArchive &Ar, int64 Value)
 
void SerializeVarInt (FArchive &Ar, int64 &Value)
 
uint64 ReadVarUIntFromArchive (FArchive &Ar)
 
void WriteVarUIntToArchive (FArchive &Ar, uint64 Value)
 
void SerializeVarUInt (FArchive &Ar, uint64 &Value)
 

Function Documentation

◆ MeasureVarInt() [1/3]

FORCEINLINE uint32 MeasureVarInt ( const void * InData)

Measure the length in bytes (1-9) of an encoded variable-length integer.

See also
MeasureVarUInt

Definition at line 67 of file VarInt.h.

+ Here is the call graph for this function:

◆ MeasureVarInt() [2/3]

FORCEINLINE uint32 MeasureVarInt ( int32 InValue)

Measure the number of bytes (1-5) required to encode the 32-bit input.

See also
MeasureVarUInt

Definition at line 85 of file VarInt.h.

+ Here is the call graph for this function:

◆ MeasureVarInt() [3/3]

FORCEINLINE uint32 MeasureVarInt ( int64 InValue)

Measure the number of bytes (1-9) required to encode the 64-bit input.

See also
MeasureVarUInt

Definition at line 91 of file VarInt.h.

+ Here is the call graph for this function:

◆ MeasureVarUInt() [1/3]

FORCEINLINE uint32 MeasureVarUInt ( const void * InData)

Measure the length in bytes (1-9) of an encoded variable-length integer.

Parameters
InDataA variable-length encoding of an (signed or unsigned) integer.
Returns
The number of bytes used to encode the integer, in the range 1-9.

Definition at line 61 of file VarInt.h.

+ Here is the caller graph for this function:

◆ MeasureVarUInt() [2/3]

FORCEINLINE uint32 MeasureVarUInt ( uint32 InValue)

Measure the number of bytes (1-5) required to encode the 32-bit input.

Definition at line 73 of file VarInt.h.

+ Here is the caller graph for this function:

◆ MeasureVarUInt() [3/3]

FORCEINLINE uint32 MeasureVarUInt ( uint64 InValue)

Measure the number of bytes (1-9) required to encode the 64-bit input.

Definition at line 79 of file VarInt.h.

+ Here is the caller graph for this function:

◆ ReadVarInt()

FORCEINLINE int64 ReadVarInt ( const void * InData,
uint32 & OutByteCount )

Read a variable-length signed integer.

Parameters
InDataA variable-length encoding of a signed integer.
OutByteCountThe number of bytes consumed from the input.
Returns
A signed integer.

Definition at line 132 of file VarInt.h.

+ Here is the call graph for this function:

◆ ReadVarIntFromArchive()

int64 ReadVarIntFromArchive ( FArchive & Ar)

◆ ReadVarUInt()

FORCEINLINE uint64 ReadVarUInt ( const void * InData,
uint32 & OutByteCount )

Read a variable-length unsigned integer.

Parameters
InDataA variable-length encoding of an unsigned integer.
OutByteCountThe number of bytes consumed from the input.
Returns
An unsigned integer.

Definition at line 103 of file VarInt.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadVarUIntFromArchive()

uint64 ReadVarUIntFromArchive ( FArchive & Ar)

◆ SerializeVarInt()

void SerializeVarInt ( FArchive & Ar,
int64 & Value )

◆ SerializeVarUInt()

void SerializeVarUInt ( FArchive & Ar,
uint64 & Value )

◆ WriteVarInt() [1/2]

FORCEINLINE uint32 WriteVarInt ( int32 InValue,
void * OutData )

Write a variable-length signed integer.

See also
WriteVarUInt

Definition at line 189 of file VarInt.h.

+ Here is the call graph for this function:

◆ WriteVarInt() [2/2]

FORCEINLINE uint32 WriteVarInt ( int64 InValue,
void * OutData )

Write a variable-length signed integer.

See also
WriteVarUInt

Definition at line 196 of file VarInt.h.

+ Here is the call graph for this function:

◆ WriteVarIntToArchive()

void WriteVarIntToArchive ( FArchive & Ar,
int64 Value )

◆ WriteVarUInt() [1/2]

FORCEINLINE uint32 WriteVarUInt ( uint32 InValue,
void * OutData )

Write a variable-length unsigned integer.

Parameters
InValueAn unsigned integer to encode.
OutDataA buffer of at least 5 bytes to write the output to.
Returns
The number of bytes used in the output.

Definition at line 145 of file VarInt.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteVarUInt() [2/2]

FORCEINLINE uint32 WriteVarUInt ( uint64 InValue,
void * OutData )

Write a variable-length unsigned integer.

Parameters
InValueAn unsigned integer to encode.
OutDataA buffer of at least 9 bytes to write the output to.
Returns
The number of bytes used in the output.

Definition at line 168 of file VarInt.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteVarUIntToArchive()

void WriteVarUIntToArchive ( FArchive & Ar,
uint64 Value )