UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FCompressedGrowableBuffer Struct Reference

#include <CompressedGrowableBuffer.h>

Public Member Functions

CORE_API FCompressedGrowableBuffer (int32 MaxPendingBufferSize, FName CompressionFormat, ECompressionFlags CompressionFlags=COMPRESS_None)
 
CORE_API void Lock ()
 
CORE_API void Unlock ()
 
CORE_API int32 Append (void *Data, int32 Size)
 
CORE_API voidAccess (int32 Offset)
 
int32 Num () const
 
SIZE_T GetAllocatedSize () const
 

Detailed Description

Growable compressed buffer. Usage is to append frequently but only request and therefore decompress very infrequently. The prime usage case is the memory profiler keeping track of full call stacks.

Constructor & Destructor Documentation

◆ FCompressedGrowableBuffer()

FCompressedGrowableBuffer::FCompressedGrowableBuffer ( int32  MaxPendingBufferSize,
FName  CompressionFormat,
ECompressionFlags  CompressionFlags = COMPRESS_None 
)

Constructor

Parameters
MaxPendingBufferSizeMax chunk size to compress in uncompressed bytes
CompressionFlagsCompression flags to compress memory with

Member Function Documentation

◆ Access()

void * FCompressedGrowableBuffer::Access ( int32  Offset)

Accesses the data at passed in offset and returns it. The memory is read-only and memory will be freed in call to unlock. The lifetime of the data is till the next call to Unlock, Append or Access

Parameters
OffsetOffset to return corresponding data for

◆ Append()

int32 FCompressedGrowableBuffer::Append ( void Data,
int32  Size 
)

Appends passed in data to the buffer. The data needs to be less than the max pending buffer size. The code will assert on this assumption.

Parameters
DataData to append
SizeSize of data in bytes.
Returns
Offset of data, used for retrieval later on

Appends passed in data to the buffer. The data needs to be less than the max pending buffer size. The code will assert on this assumption.

Parameters
DataData to append
SizeSize of data in bytes.
Returns
Offset of data, used for retrieval later on

◆ GetAllocatedSize()

SIZE_T FCompressedGrowableBuffer::GetAllocatedSize ( ) const
inline

Helper function to return the amount of memory allocated by this buffer

Returns
number of bytes allocated by this buffer

◆ Lock()

void FCompressedGrowableBuffer::Lock ( )

Locks the buffer for reading. Needs to be called before calls to Access and needs to be matched up with Unlock call.

◆ Num()

int32 FCompressedGrowableBuffer::Num ( ) const
inline
Returns
Number of entries appended.

◆ Unlock()

void FCompressedGrowableBuffer::Unlock ( )

Unlocks the buffer and frees temporary resources used for accessing.


The documentation for this struct was generated from the following files: