Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FCompression
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool CompressMemory
(
FName FormatName, |
Thread-safe abstract compression routine. | Misc/Compression.h | |
static bool CompressMemory
(
FName FormatName, |
Thunks to 64 bit CompressMemory, favor that. | Misc/Compression.h |
CompressMemory(FName, void , int64 &, const void , int64, ECompressionFlags, uintptr_t)
Description
Thread-safe abstract compression routine. Compresses memory from uncompressed buffer and writes it to compressed buffer. Updates CompressedSize with size of compressed data. Compression controlled by the passed in flags. CompressMemory is expected to return true and write valid data even if it expanded bytes. Always check CompressedSize >= UncompressedSize and fall back to uncompressed, or use CompressMemoryIfWorthDecompressing
| Name | CompressMemory |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/Compression.h |
| Include Path | #include "Misc/Compression.h" |
| Source | /Engine/Source/Runtime/Core/Private/Misc/Compression.cpp |
static bool CompressMemory
(
FName FormatName,
void * CompressedBuffer,
int64 & CompressedSize,
const void * UncompressedBuffer,
int64 UncompressedSize,
ECompressionFlags Flags,
uintptr_t CompressionData
)
true if compression succeeds, false if it fails because CompressedBuffer was too small or other reasons
Parameters
| Name | Remarks |
|---|---|
| FormatName | Name of the compression format |
| CompressedBuffer | Buffer compressed data is going to be written to |
| CompressedSize | [in/out] Size of CompressedBuffer, at exit will be size of compressed data |
| UncompressedBuffer | Buffer containing uncompressed data |
| UncompressedSize | Size of uncompressed data in bytes |
| Flags | Flags to control what method to use and optionally control memory vs speed |
| CompressionData | Additional compression parameter - see comments a top of FCompression struct. |
CompressMemory(FName, void , int32 &, const void , int32, ECompressionFlags, int32)
Description
Thunks to 64 bit CompressMemory, favor that.
| Name | CompressMemory |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/Compression.h |
| Include Path | #include "Misc/Compression.h" |
| Source | /Engine/Source/Runtime/Core/Private/Misc/Compression.cpp |
static bool CompressMemory
(
FName FormatName,
void * CompressedBuffer,
int32 & CompressedSize,
const void * UncompressedBuffer,
int32 UncompressedSize,
ECompressionFlags Flags,
int32 CompressionData
)