UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
OodleDataCompression.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6#include "CoreTypes.h"
8#include "Logging/LogMacros.h"
10
11// OodleDataCompression :
12// Unreal API for direct access to Oodle Data lossless data compression
13// for manual encoding (not in Pak/iostore)
14// NOTE : for any data that will be stored to disk, you should not be compressing it yourself!
15// allow the pak/iostore system to choose the compressor!
16//
17// Let me emphasize again : for data to be stored in packages for shipping games, do NOT use this
18// let the pak/iostore system choose the compression from the config options and platform settings
19//
20// OodleDataCompression.h is for utility compression in non-shipping game package scenarios
21// eg. uassets, storage caches and back-ends, large network transfers
22//
23// For Compression to/from TArray and such higher level actions use OodleDataCompressionUtil.h
24
26
28{
29
46//UENUM() // @todo Oodle might be nice if these were UENUM but can't pull UObject from inside Core?
47// enum values should not change, they may be persisted
48enum class ECompressor : uint8
49{
50 NotSet = 0,
51 Selkie = 1,
52 Mermaid = 2,
53 Kraken = 3,
54 Leviathan = 4 // if another added update CompressorNameMap
55};
56
57// If the input is invalid, returns false, and doesn't touch output.
59bool CORE_API ECompressorFromString(const class FString& InName, ECompressor& OutCompressor);
61
91//UENUM() // @todo Oodle might be nice if these were UENUM but can't pull UObject from inside Core?
92// ECompressionLevel must numerically match the Oodle internal enum values
94{
95 HyperFast4 = -4,
96 HyperFast3 = -3,
97 HyperFast2 = -2,
98 HyperFast1 = -1,
99 None = 0,
100 SuperFast = 1,
101 VeryFast = 2,
102 Fast = 3,
103 Normal = 4,
104 Optimal1 = 5,
105 Optimal2 = 6,
106 Optimal3 = 7,
107 Optimal4 = 8,
108 Optimal5 = 9, // if another added update CompressionLevelNameMap
109};
110
111// If the input is invalid, returns false, and doesn't touch output.
116
124
133
144
145
153
164
185 bool CompressIndependentChunks = false,
187
210 bool CompressIndependentChunks = false);
211
233 bool CompressIndependentChunks = false);
234
250 const void * InCompressedData, int64 CompressedSize
251 );
252
272 const void * InCompressedData, int64 CompressedSize
273 );
274
275// from Compression.cpp :
277
278// from LaunchEngineLoop :
280
281};
ECompressionFlags
Definition CompressionFlags.h:13
FPlatformTypes::int8 int8
An 8-bit signed integer.
Definition Platform.h:1121
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition Platform.h:1127
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition OodleDataCompression.Build.cs:11
Definition OodleDataCompression.cpp:28
int64 CORE_API CompressedBufferSizeNeeded(int64 InUncompressedSize)
Definition OodleDataCompression.cpp:227
void CORE_API StartupPreInit(void)
Definition OodleDataCompression.cpp:591
void CORE_API GetCompressorAndLevelForCommonUsage(ECompressionCommonUsage Usage, ECompressor &OutCompressor, ECompressionLevel &OutLevel)
Definition OodleDataCompression.cpp:198
int64 CompressParallel(void *OutCompressedData, int64 CompressedBufferSize, const void *InUncompressedData, int64 UncompressedSize, ECompressor Compressor, ECompressionLevel Level, bool CompressIndependentChunks)
Definition OodleDataCompression.cpp:672
CORE_API bool ECompressorToString(ECompressor InCompressor, const TCHAR **OutName)
Definition OodleDataCompression.cpp:39
int64 CORE_API GetMaximumCompressedSize(int64 InUncompressedSize)
Definition OodleDataCompression.cpp:234
CORE_API bool ECompressionLevelFromValue(int8 InValue, ECompressionLevel &OutLevel)
Definition OodleDataCompression.cpp:133
ECompressionLevel Level
Definition OodleDataCompression.cpp:70
ECompressor
Definition OodleDataCompression.h:49
CORE_API bool ECompressionLevelToString(ECompressionLevel InLevel, const TCHAR **OutName)
Definition OodleDataCompression.cpp:113
bool DecompressParallel(void *OutUncompressedData, int64 UncompressedSize, const void *InCompressedData, int64 CompressedSize)
Definition OodleDataCompression.cpp:772
ECompressionLevel
Definition OodleDataCompression.h:94
ECompressionCommonUsage
Definition OodleDataCompression.h:118
CORE_API bool ECompressionLevelFromString(const TCHAR *InName, ECompressionLevel &OutLevel)
Definition OodleDataCompression.cpp:88
CORE_API bool ECompressorFromString(const FString &InName, ECompressor &OutCompressor)
Definition OodleDataCompression.cpp:57
void CORE_API CompressionFormatInitOnFirstUseFromLock()
Definition OodleDataCompression.cpp:523
ECompressionCommonUsage CORE_API GetCommonUsageFromLegacyCompressionFlags(ECompressionFlags Flags)
Definition OodleDataCompression.cpp:179
ECompressor Compressor
Definition OodleDataCompression.cpp:30