![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Classes | |
| struct | OodleScratchBuffers |
Enumerations | |
| enum class | ECompressor : uint8 { NotSet = 0 , Selkie = 1 , Mermaid = 2 , Kraken = 3 , Leviathan = 4 } |
| enum class | ECompressionLevel : int8 { HyperFast4 = -4 , HyperFast3 = -3 , HyperFast2 = -2 , HyperFast1 = -1 , None = 0 , SuperFast = 1 , VeryFast = 2 , Fast = 3 , Normal = 4 , Optimal1 = 5 , Optimal2 = 6 , Optimal3 = 7 , Optimal4 = 8 , Optimal5 = 9 } |
| enum class | ECompressionCommonUsage : uint8 { Default = 0 , FastRealtimeEncode = 1 , SlowerSmallerEncode = 2 , SlowestOfflineDistributionEncode = 3 } |
|
strong |
|
strong |
ECompressionLevel : Choose the Oodle Compression Level this mostly trades encode speed vs compression ratio decode speed is determined by choice of compressor (ECompressor)
If in doubt start with "Normal" (level 4) then move up or down from there
The standard range is in "SuperFast" - "Normal" (levels 1-4)
"HyperFast" levels are for real-time encoding with minimal compression
The "Optimal" levels are much slower to encode, but provide more compression they are intended for offline cooks
representative encode speeds with compression ratio trade off :
Kraken-4 : 1.55:1 , 718.3 enc MB/s Kraken-3 : 1.71:1 , 541.8 enc MB/s Kraken-2 : 1.88:1 , 434.0 enc MB/s Kraken-1 : 2.10:1 , 369.1 enc MB/s Kraken1 : 2.27:1 , 242.6 enc MB/s Kraken2 : 2.32:1 , 157.4 enc MB/s Kraken3 : 2.39:1 , 34.8 enc MB/s Kraken4 : 2.44:1 , 22.4 enc MB/s Kraken5 : 2.55:1 , 10.1 enc MB/s Kraken6 : 2.56:1 , 5.4 enc MB/s Kraken7 : 2.64:1 , 3.7 enc MB/s
| Enumerator | |
|---|---|
| HyperFast4 | |
| HyperFast3 | |
| HyperFast2 | |
| HyperFast1 | |
| None | |
| SuperFast | |
| VeryFast | |
| Fast | |
| Normal | |
| Optimal1 | |
| Optimal2 | |
| Optimal3 | |
| Optimal4 | |
| Optimal5 | |
|
strong |
ECompressor : Choose the Oodle Compressor this mostly trades decompression speed vs compression ratio encode speed is determined by ECompressionLevel , not the compressor choice.
From fastest to slowest (to decode) : Selkie, Mermaid, Kraken, Leviathan
When in doubt, start with Kraken Representative compression ratios and decode speeds :
Selkie4 : 1.86:1 , 4232.6 dec MB/s Mermaid4 : 2.21:1 , 2648.9 dec MB/s Kraken4 : 2.44:1 , 1467.1 dec MB/s Leviathan4 : 2.62:1 , 961.8 dec MB/s
| Enumerator | |
|---|---|
| NotSet | |
| Selkie | |
| Mermaid | |
| Kraken | |
| Leviathan | |
| int64 CORE_API FOodleDataCompression::Compress | ( | void * | OutCompressedData, |
| int64 | CompressedBufferSize, | ||
| const void * | InUncompressedData, | ||
| int64 | UncompressedSize, | ||
| ECompressor | Compressor, | ||
| ECompressionLevel | Level, | ||
| bool | CompressIndependentChunks = false, |
||
| int64 | DictionaryBackup = 0 |
||
| ) |
Encode provided data with chosen Compressor and Level CompressedBufferSize must be >= CompressedBufferSizeNeeded(UncompressedSize) use CompressParallel instead if buffer can ever be large
| OutCompressedData | output buffer where compressed data is written |
| CompressedBufferSize | bytes available to write in OutCompressedData |
| InUncompressedData | input buffer containing data to compress |
| UncompressedSize | number of bytes in InUncompressedData to read |
| Compressor | ECompressor to encode with (this is saved in the stream) |
| Level | ECompressionLevel to encode with (this is not saved in the stream) |
| CompressIndependentChunks | (optional) should chunks be made independent (allows for parallel decode) |
| DictionaryBackup | (optional) number of bytes preceding InUncompressedData which should be used for dictionary preload |
What size of compressed output buffer is needed to encode into for Compress()
| UncompressedSize | Length of uncompressed data that will fit in this output buffer |
| int64 CORE_API FOodleDataCompression::CompressParallel | ( | TArray64< uint8 > & | OutCompressedData, |
| const void * | InUncompressedData, | ||
| int64 | UncompressedSize, | ||
| ECompressor | Compressor, | ||
| ECompressionLevel | Level, | ||
| bool | CompressIndependentChunks = false |
||
| ) |
Encode provided data with chosen Compressor and Level, using multiple threads for large buffers CompressedBufferSize must be >= CompressedBufferSizeNeeded(UncompressedSize) CompressParallel can be used in all cases instead of Compress it is fast even on small buffers (will just run synchronously on the calling thread) the output compressed data is the same as Compress can be decoded with either Decompress or DecompressParallel DecompressParallel can only parallelize if CompressIndependentChunks is true at encode time
| OutCompressedData | output buffer where compressed data is written; array is appended to |
| InUncompressedData | input buffer containing data to compress |
| UncompressedSize | number of bytes in InUncompressedData to read |
| Compressor | ECompressor to encode with (this is saved in the stream) |
| Level | ECompressionLevel to encode with (this is not saved in the stream) |
| CompressIndependentChunks | should chunks be made independent (allows for parallel decode) |
| int64 CORE_API FOodleDataCompression::CompressParallel | ( | void * | OutCompressedData, |
| int64 | CompressedBufferSize, | ||
| const void * | InUncompressedData, | ||
| int64 | UncompressedSize, | ||
| ECompressor | Compressor, | ||
| ECompressionLevel | Level, | ||
| bool | CompressIndependentChunks = false |
||
| ) |
Encode provided data with chosen Compressor and Level, using multiple threads for large buffers CompressedBufferSize must be >= CompressedBufferSizeNeeded(UncompressedSize) CompressParallel can be used in all cases instead of Compress it is fast even on small buffers (will just run synchronously on the calling thread) the output compressed data is the same as Compress can be decoded with either Decompress or DecompressParallel DecompressParallel can only parallelize if CompressIndependentChunks is true at encode time
| OutCompressedData | output buffer where compressed data is written |
| CompressedBufferSize | bytes available to write in OutCompressedData |
| InUncompressedData | input buffer containing data to compress |
| UncompressedSize | number of bytes in InUncompressedData to read |
| Compressor | ECompressor to encode with (this is saved in the stream) |
| Level | ECompressionLevel to encode with (this is not saved in the stream) |
| CompressIndependentChunks | (optional) should chunks be made independent (allows for parallel decode) |
| int64 FOodleDataCompression::CompressParallelSub | ( | TArray64< TArray64< uint8 > > & | OutChunkCompressedData, |
| const void * | InUncompressedData, | ||
| int64 | UncompressedSize, | ||
| ECompressor | Compressor, | ||
| ECompressionLevel | Level, | ||
| bool | CompressIndependentChunks | ||
| ) |
| bool CORE_API FOodleDataCompression::Decompress | ( | void * | OutUncompressedData, |
| int64 | UncompressedSize, | ||
| const void * | InCompressedData, | ||
| int64 | CompressedSize | ||
| ) |
Decode compressed data that was made by Compress
UncompressedSize must match exactly the uncompressed size that was used at encode time. No partial decodes.
If buffer can ever be large, use DecompressParallel instead
| OutUncompressedData | output buffer where uncompressed data is written |
| UncompressedSize | number of bytes to decompress |
| InCompressedData | input buffer containing compressed data |
| CompressedSize | size of the input buffer, must be greater or equal to the number of compressed bytes needed |
| bool CORE_API FOodleDataCompression::DecompressParallel | ( | void * | OutUncompressedData, |
| int64 | UncompressedSize, | ||
| const void * | InCompressedData, | ||
| int64 | CompressedSize | ||
| ) |
Decode compressed data that was made by Compress, using multiple threads when possible.
UncompressedSize must match exactly the uncompressed size that was used at encode time. No partial decodes.
There's no penalty to using this on small buffers, it will just decode synchronously on the calling thread in that case. DecompressParallel can be used to decode data written by Compress or CompressParallel. DecompressParallel can be used in all places you would call Decompress.
DecompressParallel can only use more than 1 thread if the encoding was done with CompressIndependentChunks = true
| OutUncompressedData | output buffer where uncompressed data is written |
| UncompressedSize | number of bytes to decompress |
| InCompressedData | input buffer containing compressed data |
| CompressedSize | size of the input buffer, must be greater or equal to the number of compressed bytes needed |
| CORE_API bool FOodleDataCompression::ECompressionLevelFromString | ( | const TCHAR * | InName, |
| ECompressionLevel & | OutLevel | ||
| ) |
| bool CORE_API FOodleDataCompression::ECompressionLevelFromValue | ( | int8 | InValue, |
| ECompressionLevel & | OutLevel | ||
| ) |
| CORE_API const TCHAR * FOodleDataCompression::ECompressionLevelToString | ( | ECompressionLevel | InLevel | ) |
| bool CORE_API FOodleDataCompression::ECompressionLevelToString | ( | ECompressionLevel | InLevel, |
| const TCHAR ** | OutName | ||
| ) |
| bool CORE_API FOodleDataCompression::ECompressorFromString | ( | const class FString & | InName, |
| ECompressor & | OutCompressor | ||
| ) |
| CORE_API bool FOodleDataCompression::ECompressorFromString | ( | const FString & | InName, |
| ECompressor & | OutCompressor | ||
| ) |
| CORE_API const TCHAR * FOodleDataCompression::ECompressorToString | ( | ECompressor | InCompressor | ) |
| bool CORE_API FOodleDataCompression::ECompressorToString | ( | ECompressor | InCompressor, |
| const TCHAR ** | OutName | ||
| ) |
| ECompressionCommonUsage CORE_API FOodleDataCompression::GetCommonUsageFromLegacyCompressionFlags | ( | ECompressionFlags | Flags | ) |
Translate legacy CompressionFlags to an ECompressionCommonUsage CompressionFlags is not encouraged for new code; prefer directly calling to Oodle
| Flags | ECompressionFlags (BiasSpeed,BiasSize,ForPackaging) |
| void CORE_API FOodleDataCompression::GetCompressorAndLevelForCommonUsage | ( | ECompressionCommonUsage | Usage, |
| ECompressor & | OutCompressor, | ||
| ECompressionLevel & | OutLevel | ||
| ) |
Translate CompressionCommonUsage to a Compressor & Level selection usually prefer the more expressive choice of {Compressor,Level}
| Usage | Your intended compression use case |
| OutCompressor | Output reference |
| OutLevel | Output reference |
What is the maximum size of compressed data made after encoding For pre-allocating buffers at decode time or to check the length of compressed data at load time NOTE : CompressedBufferSizeNeeded() >= GetMaximumCompressedSize() this is not the size to allocate compressed buffers at encode time; see CompressedBufferSizeNeeded
| UncompressedSize | Length of uncompressed data that could have been encoded |
| ECompressor FOodleDataCompression::Compressor |
| ECompressionLevel FOodleDataCompression::Level |
| const TCHAR* FOodleDataCompression::Name |