Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FCompression
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool CompressMemoryIfWorthDecompressing
(
FName FormatName, |
32 bit thunk. This legacy function doens't separate bOutWasCompressed vs general compress failure and will return false in both cases. | Misc/Compression.h | |
static bool CompressMemoryIfWorthDecompressing
(
FName FormatName, |
Same as CompressMemory but evaluates if the compression gain is worth the runtime decode time. | Misc/Compression.h |
CompressMemoryIfWorthDecompressing(FName, int32, int32, void , int32 &, const void , int32, ECompressionFlags, int32)
Description
32 bit thunk. This legacy function doens't separate bOutWasCompressed vs general compress failure and will return false in both cases.
| Name | CompressMemoryIfWorthDecompressing |
| 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 CompressMemoryIfWorthDecompressing
(
FName FormatName,
int32 MinBytesSaved,
int32 MinPercentSaved,
void * CompressedBuffer,
int32 & CompressedSize,
const void * UncompressedBuffer,
int32 UncompressedSize,
ECompressionFlags Flags,
int32 CompressionData
)
CompressMemoryIfWorthDecompressing(FName, bool &, int64, int32, void , int64 &, const void , int64, ECompressionFlags, uintptr_t)
Description
Same as CompressMemory but evaluates if the compression gain is worth the runtime decode time.
| Name | CompressMemoryIfWorthDecompressing |
| 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 CompressMemoryIfWorthDecompressing
(
FName FormatName,
bool & bOutWasCompressed,
int64 MinBytesSaved,
int32 MinPercentSaved,
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 |
| bOutWasCompressed | [out] Whether the compression was worth it. The data is still compressed. |
| MinBytesSaved | Minimum amount of bytes which should be saved when performing compression, otherwise false is returned |
| MinPercentSaved | Minimum percentage of the buffer which should be saved when performing compression, otherwise false is returned |
| 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. |