Navigation
API > API/Runtime > API/Runtime/Core
| Name | FCompression |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/Compression.h |
| Include Path | #include "Misc/Compression.h" |
Syntax
struct FCompression
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CompressionFormats | TMap< FName, struct ICompressionFormat * > | Mapping of Compression FNames to their compressor objects | Misc/Compression.h |
| CompressionFormatsCriticalSection | FCriticalSection | Misc/Compression.h | |
| CompressorDstBytes | TAtomic< uint64 > | Number of bytes after compression. |
Nubmer of bytes after compression. | Misc/Compression.h |
| CompressorSrcBytes | TAtomic< uint64 > | Number of bytes before compression. | Misc/Compression.h |
| CompressorTimeCycles | TAtomic< uint64 > | CompressionData is per-compressor data passed through this API and is interpreted by the codecs. | Misc/Compression.h |
Functions
Static
| 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 | |
static bool CompressMemoryBound
(
FName InFormatName, |
Thread-safe abstract compression routine to query buffer requirements for a compression operation. | Misc/Compression.h | |
static int32 CompressMemoryBound
(
FName FormatName, |
Thunks to the 64 bit, prefer that as this can only Fatal on error! | Misc/Compression.h | |
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 | |
static ICompressionFormat * GetCompressionFormat
(
FName Method, |
Find a compression format module by name, returning nullptr if no module found | Misc/Compression.h | |
static FName GetCompressionFormatFromDeprecatedFlags
(
ECompressionFlags DeprecatedFlags |
Deprecating this because we "should", but all internal references to these flags were deprecated in 4.21 so hopefully no one is using them anymore! | Misc/Compression.h | |
| Returns a string which can be used to identify if a format has become out of date | Misc/Compression.h | ||
static uint32 GetCompressorVersion
(
FName FormatName |
Returns a version number for a specified format | Misc/Compression.h | |
static bool GetMaximumCompressedSize
(
FName InFormatName, |
Thread-safe abstract compression routine to query maximum compressed size that could be made. | Misc/Compression.h | |
static int32 GetMaximumCompressedSize
(
FName FormatName, |
Thunks to the 64 bit version, prefer that as this can only Fatal on error! | Misc/Compression.h | |
static bool IsFormatValid
(
FName FormatName |
Checks to see if a format will be usable, so that a fallback can be used | Misc/Compression.h | |
static bool UncompressMemory
(
FName FormatName, |
Thread-safe abstract decompression routine. | Misc/Compression.h | |
static bool UncompressMemoryStream
(
FName FormatName, |
Wraps UncompressMemory to provide access with a IMemoryReadStream interface, attempting to avoid copying in to a contiguous buffer doe decompression if the format supports it. | Misc/Compression.h | |
static bool VerifyCompressionFlagsValid
(
int32 InCompressionFlags |
Verifies if the passed in value represents valid compression flags | Misc/Compression.h |